За последние 24 часа нас посетили 34993 программиста и 1758 роботов. Сейчас ищут 775 программистов ...

Как выставить регионы в Друпале в одну линию?

Тема в разделе "Прочее", создана пользователем OptimisticDigit, 21 мар 2011.

  1. OptimisticDigit

    OptimisticDigit Активный пользователь

    С нами с:
    29 янв 2009
    Сообщения:
    72
    Симпатии:
    0
    Добавила регионы в Друпале. Все работает. А как сделать так, чтобы в одной строке было два региона?


    А еще: Как сделать чтобы в блоке был и текст и поиск например?


    Подскажите плиз.
     
  2. Gromo

    Gromo Активный пользователь

    С нами с:
    24 май 2010
    Сообщения:
    2.786
    Симпатии:
    2
    Адрес:
    Ташкент
    OptimisticDigit
    как-то это всё расплывчато. рисунок бы того что есть и того как надо.
    подозреваю, что тут нужно в хтмл мутить со стилями
     
  3. OptimisticDigit

    OptimisticDigit Активный пользователь

    С нами с:
    29 янв 2009
    Сообщения:
    72
    Симпатии:
    0
    есть тема. В каждой теме стандартно шапка однорегионная. А мне надо чтобы в шапке было два региона.
    В каком файле мутить хтмл.
    Я добавила регион в page.tpl.php и прописала в .info темы, но он там добавляет строку. А мне,повторюсь, надо в строке - два региона...
     
  4. tommyangelo

    tommyangelo Старожил

    С нами с:
    6 дек 2009
    Сообщения:
    2.549
    Симпатии:
    0
    Адрес:
    Мариуполь
    ссылку в студию)
     
  5. OptimisticDigit

    OptimisticDigit Активный пользователь

    С нами с:
    29 янв 2009
    Сообщения:
    72
    Симпатии:
    0
    на что? Это стандартная тема. С монолитным хедэром.
    подскажите че делать. "как делить на два?"
     
  6. Gromo

    Gromo Активный пользователь

    С нами с:
    24 май 2010
    Сообщения:
    2.786
    Симпатии:
    2
    Адрес:
    Ташкент
    /2
     
  7. Benjamin

    Benjamin Активный пользователь

    С нами с:
    23 янв 2009
    Сообщения:
    154
    Симпатии:
    0
    Адрес:
    Тула
  8. Padaboo

    Padaboo Старожил
    Команда форума Модератор

    С нами с:
    26 окт 2009
    Сообщения:
    5.242
    Симпатии:
    1
    OptimisticDigit
    думается, что тут друпалом тут мало кто занимается, поэтому нужно видеть код, скриншот того что получается или ссылку
     
  9. OptimisticDigit

    OptimisticDigit Активный пользователь

    С нами с:
    29 янв 2009
    Сообщения:
    72
    Симпатии:
    0
    код файла page.tpl.php:

    PHP:
    1. <?php
    2. // $Id: page.tpl.php,v 1.14.2.10 2009/11/05 14:26:26 johnalbin Exp $
    3.  
    4. /**
    5.  * @file page.tpl.php
    6.  *
    7.  * Theme implementation to display a single Drupal page.
    8.  *
    9.  * Available variables:
    10.  *
    11.  * General utility variables:
    12.  * - $base_path: The base URL path of the Drupal installation. At the very
    13.  *   least, this will always default to /.
    14.  * - $css: An array of CSS files for the current page.
    15.  * - $directory: The directory the theme is located in, e.g. themes/garland or
    16.  *   themes/garland/minelli.
    17.  * - $is_front: TRUE if the current page is the front page. Used to toggle the mission statement.
    18.  * - $logged_in: TRUE if the user is registered and signed in.
    19.  * - $is_admin: TRUE if the user has permission to access administration pages.
    20.  *
    21.  * Page metadata:
    22.  * - $language: (object) The language the site is being displayed in.
    23.  *   $language->language contains its textual representation.
    24.  *   $language->dir contains the language direction. It will either be 'ltr' or 'rtl'.
    25.  * - $head_title: A modified version of the page title, for use in the TITLE tag.
    26.  * - $head: Markup for the HEAD section (including meta tags, keyword tags, and
    27.  *   so on).
    28.  * - $styles: Style tags necessary to import all CSS files for the page.
    29.  * - $scripts: Script tags necessary to load the JavaScript files and settings
    30.  *   for the page.
    31.  * - $body_classes: A set of CSS classes for the BODY tag. This contains flags
    32.  *   indicating the current layout (multiple columns, single column), the current
    33.  *   path, whether the user is logged in, and so on.
    34.  * - $body_classes_array: An array of the body classes. This is easier to
    35.  *   manipulate then the string in $body_classes.
    36.  * - $node: Full node object. Contains data that may not be safe. This is only
    37.  *   available if the current page is on the node's primary url.
    38.  *
    39.  * Site identity:
    40.  * - $front_page: The URL of the front page. Use this instead of $base_path,
    41.  *   when linking to the front page. This includes the language domain or prefix.
    42.  * - $logo: The path to the logo image, as defined in theme configuration.
    43.  * - $site_name: The name of the site, empty when display has been disabled
    44.  *   in theme settings.
    45.  * - $site_slogan: The slogan of the site, empty when display has been disabled
    46.  *   in theme settings.
    47.  * - $mission: The text of the site mission, empty when display has been disabled
    48.  *   in theme settings.
    49.  *
    50.  * Navigation:
    51.  * - $search_box: HTML to display the search box, empty if search has been disabled.
    52.  * - $primary_links (array): An array containing primary navigation links for the
    53.  *   site, if they have been configured.
    54.  * - $secondary_links (array): An array containing secondary navigation links for
    55.  *   the site, if they have been configured.
    56.  *
    57.  * Page content (in order of occurrance in the default page.tpl.php):
    58.  * - $left: The HTML for the left sidebar.
    59.  *
    60.  * - $breadcrumb: The breadcrumb trail for the current page.
    61.  * - $title: The page title, for use in the actual HTML content.
    62.  * - $help: Dynamic help text, mostly for admin pages.
    63.  * - $messages: HTML for status and error messages. Should be displayed prominently.
    64.  * - $tabs: Tabs linking to any sub-pages beneath the current page (e.g., the view
    65.  *   and edit tabs when displaying a node).
    66.  *
    67.  * - $content: The main content of the current Drupal page.
    68.  *
    69.  * - $right: The HTML for the right sidebar.
    70.  *
    71.  * Footer/closing data:
    72.  * - $feed_icons: A string of all feed icons for the current page.
    73.  * - $footer_message: The footer message as defined in the admin settings.
    74.  * - $footer : The footer region.
    75.  * - $closure: Final closing markup from any modules that have altered the page.
    76.  *   This variable should always be output last, after all other dynamic content.
    77.  *
    78.  * @see template_preprocess()
    79.  * @see template_preprocess_page()
    80.  */
    81. ?>
    82. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    83. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language; ?>" lang="<?php print $language->language; ?>" dir="<?php print $language->dir; ?>">
    84.  
    85. <head>
    86.   <title><?php print $head_title; ?></title>
    87.   <?php print $head; ?>
    88.   <?php print $styles; ?>
    89.   <?php print $scripts; ?>
    90. </head>
    91. <body class="<?php print $body_classes; ?>">
    92.  
    93.   <div id="page"><div id="page-inner">
    94.  
    95.     <a name="navigation-top" id="navigation-top"></a>
    96.     <?php if ($primary_links || $secondary_links || $navbar): ?>
    97.       <div id="skip-to-nav"><a href="#navigation"><?php print t('Skip to Navigation'); ?></a></div>
    98.     <?php endif; ?>
    99.  
    100.  
    101.  
    102.  
    103.  
    104.  
    105.  
    106.  
    107.  
    108.  
    109.     <div id="header"><div id="header-inner" class="clear-block">
    110.  
    111.       <?php if ($logo || $site_name || $site_slogan): ?>
    112.         <div id="logo-title">
    113.  
    114.           <?php if ($logo): ?>
    115.             <div id="logo"><a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home"><img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" id="logo-image" /></a></div>
    116.           <?php endif; ?>
    117.  
    118.           <?php if ($site_name): ?>
    119.             <?php if ($title): ?>
    120.               <div id="site-name"><strong>
    121.                 <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home">
    122.                 <?php print $site_name; ?>
    123.                 </a>
    124.               </strong></div>
    125.             <?php else: ?>
    126.               <h1 id="site-name">
    127.                 <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home">
    128.                 <?php print $site_name; ?>
    129.                 </a>
    130.               </h1>
    131.             <?php endif; ?>
    132.           <?php endif; ?>
    133.  
    134.           <?php if ($site_slogan): ?>
    135.             <div id="site-slogan"><?php print $site_slogan; ?></div>
    136.           <?php endif; ?>
    137.  
    138.         </div> <!-- /#logo-title -->
    139.       <?php endif; ?>
    140.  
    141.       <?php if ($header): ?>
    142.       <div id="header-blocks" class="region region-header">
    143.           <?php print $header; ?>
    144.            
    145.  </div> <!-- /#header-blocks -->
    146.       <?php endif; ?>
    147.      
    148.   <!-- /#new-reg -->
    149. <?php if ($newreg): ?>
    150.  <div id="new-reg"> <?php print $newreg ?>
    151.    <?php endif; ?>
    152.  </div>  
    153.  </div> <!-- /#header-inner, /#header -->
    154.  
    155.     <div id="main"><div id="main-inner" class="clear-block<?php if ($search_box || $primary_links || $secondary_links || $navbar) { print ' with-navbar'; } ?>">
    156.  
    157.       <div id="content"><div id="content-inner">
    158.  
    159.         <?php if ($mission): ?>
    160.           <div id="mission"><?php print $mission; ?></div>
    161.         <?php endif; ?>
    162.  
    163.         <?php if ($content_top): ?>
    164.           <div id="content-top" class="region region-content_top">
    165.             <?php print $content_top; ?>
    166.           </div> <!-- /#content-top -->
    167.         <?php endif; ?>
    168.  
    169.         <?php if ($breadcrumb || $title || $tabs || $help || $messages): ?>
    170.           <div id="content-header">
    171.             <?php print $breadcrumb; ?>
    172.             <?php if ($title): ?>
    173.               <h1 class="title"><?php print $title; ?></h1>
    174.             <?php endif; ?>
    175.             <?php print $messages; ?>
    176.             <?php if ($tabs): ?>
    177.               <div class="tabs"><?php print $tabs; ?></div>
    178.             <?php endif; ?>
    179.             <?php print $help; ?>
    180.           </div> <!-- /#content-header -->
    181.         <?php endif; ?>
    182.  
    183.         <div id="content-area">
    184.           <?php print $content; ?>
    185.         </div>
    186.  
    187.         <?php if ($feed_icons): ?>
    188.           <div class="feed-icons"><?php print $feed_icons; ?></div>
    189.         <?php endif; ?>
    190.  
    191.         <?php if ($content_bottom): ?>
    192.           <div id="content-bottom" class="region region-content_bottom">
    193.             <?php print $content_bottom; ?>
    194.           </div> <!-- /#content-bottom -->
    195.         <?php endif; ?>
    196.  
    197.       </div></div> <!-- /#content-inner, /#content -->
    198.  
    199.       <?php if ($search_box || $primary_links || $secondary_links || $navbar): ?>
    200.         <div id="navbar"><div id="navbar-inner" class="clear-block region region-navbar">
    201.  
    202.           <a name="navigation" id="navigation"></a>
    203.  
    204.           <?php if ($search_box): ?>
    205.             <div id="search-box">
    206.               <?php print $search_box; ?>
    207.             </div> <!-- /#search-box -->
    208.           <?php endif; ?>
    209.  
    210.           <?php if ($primary_links): ?>
    211.             <div id="primary" class="clear-block">
    212.               <?php print theme('links', $primary_links); ?>
    213.             </div> <!-- /#primary -->
    214.           <?php endif; ?>
    215.  
    216.           <?php if ($secondary_links): ?>
    217.             <div id="secondary" class="clear-block">
    218.               <?php print theme('links', $secondary_links); ?>
    219.             </div> <!-- /#secondary -->
    220.           <?php endif; ?>
    221.  
    222.           <?php print $navbar; ?>
    223.  
    224.         </div></div> <!-- /#navbar-inner, /#navbar -->
    225.       <?php endif; ?>
    226.  
    227.       <?php if ($left): ?>
    228.         <div id="sidebar-left"><div id="sidebar-left-inner" class="region region-left">
    229.           <?php print $left; ?>
    230.         </div></div> <!-- /#sidebar-left-inner, /#sidebar-left -->
    231.       <?php endif; ?>
    232.  
    233.       <?php if ($right): ?>
    234.         <div id="sidebar-right"><div id="sidebar-right-inner" class="region region-right">
    235.           <?php print $right; ?>
    236.         </div></div> <!-- /#sidebar-right-inner, /#sidebar-right -->
    237.       <?php endif; ?>
    238.  
    239.     </div></div>
    240.        
    241.     <!-- /#main-inner, /#main -->
    242.  
    243.     <?php if ($footer || $footer_message): ?>
    244.       <div id="footer"><div id="footer-inner" class="region region-footer">
    245.  
    246.         <?php if ($footer_message): ?>
    247.           <div id="footer-message"><?php print $footer_message; ?></div>
    248.         <?php endif; ?>
    249.  
    250.         <?php print $footer; ?>
    251.  
    252.       </div></div> <!-- /#footer-inner, /#footer -->
    253.     <?php endif; ?>
    254.  
    255.   </div></div> <!-- /#page-inner, /#page -->
    256.  
    257.   <?php if ($closure_region): ?>
    258.     <div id="closure-blocks" class="region region-closure"><?php print $closure_region; ?></div>
    259.   <?php endif; ?>
    260.  
    261.   <?php print $closure; ?>
    262.  
    263. </body>
    264. </html>

    куда че добавить чтобы сделать два столбца в header и два в newreg?

    Заранее благодарю всех тех, кто действительно попытается помочь а не будет пускать идиотские шуточки.
     
  10. OptimisticDigit

    OptimisticDigit Активный пользователь

    С нами с:
    29 янв 2009
    Сообщения:
    72
    Симпатии:
    0
    ссылки нет, потому как на денвере пока делаю.
     
  11. Gromo

    Gromo Активный пользователь

    С нами с:
    24 май 2010
    Сообщения:
    2.786
    Симпатии:
    2
    Адрес:
    Ташкент
    нехорошие вы. уйду я от вас...
     
  12. Padaboo

    Padaboo Старожил
    Команда форума Модератор

    С нами с:
    26 окт 2009
    Сообщения:
    5.242
    Симпатии:
    1
    OptimisticDigit
    не понимаю как все это выглядит
    может просто продублировать нужны блоки, назначить им новые class= и попробовать менять float?
     
  13. igordata

    igordata Суперстар
    Команда форума Модератор

    С нами с:
    18 мар 2010
    Сообщения:
    32.408
    Симпатии:
    1.768
    при чем тут друпал? друпал это движок на пхп для вывода текста в браузер. друпал тут ни при чем вобще. нужно дизайнить-менять-резать - идешь в шаблон и ляпаешь как хочется.

    htmlbook.ru и firebug могут помочь. или верстальщик. К друпал только это никакого отношения не имеет.

    в строку можно выставить если через табличку, или через дивы, которые помещаются и у них дисплей:инлайн кажется. но это еще не все. надо может быть выставить флоаты, импортанты, прочую лабудень. Может быть засунуть их оба в другой див. Это обычное дело.
     
  14. Elkaz

    Elkaz Старожил
    Команда форума Модератор

    С нами с:
    26 июн 2006
    Сообщения:
    3.373
    Симпатии:
    0
    Адрес:
    Баку, Азербайджан
    OptimisticDigit
    Попробуйте реализовать то что вам нужно на чистом HTML, а потом уже внедрить в вёрстку Друпала.
     
  15. igordata

    igordata Суперстар
    Команда форума Модератор

    С нами с:
    18 мар 2010
    Сообщения:
    32.408
    Симпатии:
    1.768
    во! с языком у меня плохо, знаю. Но именно это я и пытался сказать :D
     
  16. OptimisticDigit

    OptimisticDigit Активный пользователь

    С нами с:
    29 янв 2009
    Сообщения:
    72
    Симпатии:
    0
    Все хорошо у тебя с языком! То, что ты написал

    мне говорит о большем, чем

     
  17. igordata

    igordata Суперстар
    Команда форума Модератор

    С нами с:
    18 мар 2010
    Сообщения:
    32.408
    Симпатии:
    1.768
    OptimisticDigit
    ну... повезло =)

    а в друпаловских шаблонах все просто. Главное сверстать, а потом пишешь ченить типа <?php echo $page; ?> и дело с концом.
     
  18. OptimisticDigit

    OptimisticDigit Активный пользователь

    С нами с:
    29 янв 2009
    Сообщения:
    72
    Симпатии:
    0
    Резюмируем:
    надо действительно писать
    display: inline;
     
  19. igordata

    igordata Суперстар
    Команда форума Модератор

    С нами с:
    18 мар 2010
    Сообщения:
    32.408
    Симпатии:
    1.768
    чудо! чудо! =)

    забей на свой локалхост уже. давно б купила хвостинг за 10 рублей и ссылки давала. а там в фаербаге пять минут такие вопросы решать. А тут полмесяца вышло. =)
     
  20. OptimisticDigit

    OptimisticDigit Активный пользователь

    С нами с:
    29 янв 2009
    Сообщения:
    72
    Симпатии:
    0
    Зато терь понимаю что да как.
    Да и мне времени до мая дали - успею...... (задумалась)... да. успею. :)
     
  21. igordata

    igordata Суперстар
    Команда форума Модератор

    С нами с:
    18 мар 2010
    Сообщения:
    32.408
    Симпатии:
    1.768
    диплом? =)
     
  22. OptimisticDigit

    OptimisticDigit Активный пользователь

    С нами с:
    29 янв 2009
    Сообщения:
    72
    Симпатии:
    0
    нееее...
    Альтруистический фриланс )
     
  23. OptimisticDigit

    OptimisticDigit Активный пользователь

    С нами с:
    29 янв 2009
    Сообщения:
    72
    Симпатии:
    0
    Предложила помощь свою бесплатную. Так как мне интересно попробовать а им надо очень. )
     
  24. Apple

    Apple Активный пользователь

    С нами с:
    13 янв 2007
    Сообщения:
    4.984
    Симпатии:
    2
    Кому очень надо - деньги платят.
     
  25. OptimisticDigit

    OptimisticDigit Активный пользователь

    С нами с:
    29 янв 2009
    Сообщения:
    72
    Симпатии:
    0
    Это не правильная философия.