Advertisement
thebys

drupal page template

Mar 3rd, 2015
331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 8.96 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4.  * @file
  5.  * Default theme implementation to display a single Drupal page.
  6.  *
  7.  * The doctype, html, head and body tags are not in this template. Instead they
  8.  * can be found in the html.tpl.php template in this directory.
  9.  *
  10.  * Available variables:
  11.  *
  12.  * General utility variables:
  13.  * - $base_path: The base URL path of the Drupal installation. At the very
  14.  *   least, this will always default to /.
  15.  * - $directory: The directory the template is located in, e.g. modules/system
  16.  *   or themes/bartik.
  17.  * - $is_front: TRUE if the current page is the front page.
  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.  * Site identity:
  22.  * - $front_page: The URL of the front page. Use this instead of $base_path,
  23.  *   when linking to the front page. This includes the language domain or
  24.  *   prefix.
  25.  * - $logo: The path to the logo image, as defined in theme configuration.
  26.  * - $site_name: The name of the site, empty when display has been disabled
  27.  *   in theme settings.
  28.  * - $site_slogan: The slogan of the site, empty when display has been disabled
  29.  *   in theme settings.
  30.  *
  31.  * Navigation:
  32.  * - $main_menu (array): An array containing the Main menu links for the
  33.  *   site, if they have been configured.
  34.  * - $secondary_menu (array): An array containing the Secondary menu links for
  35.  *   the site, if they have been configured.
  36.  * - $breadcrumb: The breadcrumb trail for the current page.
  37.  *
  38.  * Page content (in order of occurrence in the default page.tpl.php):
  39.  * - $title_prefix (array): An array containing additional output populated by
  40.  *   modules, intended to be displayed in front of the main title tag that
  41.  *   appears in the template.
  42.  * - $title: The page title, for use in the actual HTML content.
  43.  * - $title_suffix (array): An array containing additional output populated by
  44.  *   modules, intended to be displayed after the main title tag that appears in
  45.  *   the template.
  46.  * - $messages: HTML for status and error messages. Should be displayed
  47.  *   prominently.
  48.  * - $tabs (array): Tabs linking to any sub-pages beneath the current page
  49.  *   (e.g., the view and edit tabs when displaying a node).
  50.  * - $action_links (array): Actions local to the page, such as 'Add menu' on the
  51.  *   menu administration interface.
  52.  * - $feed_icons: A string of all feed icons for the current page.
  53.  * - $node: The node object, if there is an automatically-loaded node
  54.  *   associated with the page, and the node ID is the second argument
  55.  *   in the page's path (e.g. node/12345 and node/12345/revisions, but not
  56.  *   comment/reply/12345).
  57.  *
  58.  * Regions:
  59.  * - $page['help']: Dynamic help text, mostly for admin pages.
  60.  * - $page['highlighted']: Items for the highlighted content region.
  61.  * - $page['content']: The main content of the current page.
  62.  * - $page['sidebar_first']: Items for the first sidebar.
  63.  * - $page['sidebar_second']: Items for the second sidebar.
  64.  * - $page['header']: Items for the header region.
  65.  * - $page['footer']: Items for the footer region.
  66.  *
  67.  * @see template_preprocess()
  68.  * @see template_preprocess_page()
  69.  * @see template_process()
  70.  * @see html.tpl.php
  71.  *
  72.  * @ingroup themeable
  73.  */
  74. ?>
  75.  
  76. <div id="page-wrapper">
  77.     <div id="page">
  78.  
  79.         <div id="header">
  80.             <div class="section clearfix">
  81.  
  82.                 <?php if ($page['header_left']): ?>
  83.                     <div id="header-left" class="headerbox left">
  84.                         <div class="section">
  85.                             <?php print render($page['header_left']); ?>
  86.                         </div>
  87.                     </div>
  88.                 <?php endif; ?>
  89.                 <?php if ($page['header_middle']): ?>
  90.                     <div id="header-middle" class="headerbox middle">
  91.                         <div class="section">
  92.                             <?php print render($page['header_middle']); ?>
  93.                         </div>
  94.                     </div>
  95.                 <?php endif; ?>
  96.  
  97.  
  98.                 <?php if ($page['header_right']): ?>
  99.                     <div id="header-right" class="headerbox right">
  100.                         <?php if ($page['header_langselect']): ?>
  101.                             <div id="header-langselect" class="langselect">
  102.                                 <?php print render($page['header_langselect']); ?>
  103.                             </div>
  104.                         <?php endif; ?>
  105.                         <div class="section">
  106.                             <?php print render($page['header_right']); ?>
  107.                         </div>
  108.                     </div>
  109.                 <?php endif; ?>
  110.  
  111.                 <?php print render($page['header']); ?>
  112.             </div>
  113.         </div>
  114.         <!-- /.section, /#header -->
  115.  
  116.         <?php if ($site_slogan): ?>
  117.             <div id="name-and-slogan">
  118.                 <?php if ($site_slogan): ?>
  119.                     <div id="header-slogan"><?php print $site_slogan; ?></div>
  120.                 <?php endif; ?>
  121.             </div> <!-- /#name-and-slogan -->
  122.         <?php endif; ?>
  123.  
  124.  
  125.         <?php if ($main_menu || $secondary_menu): ?>
  126.             <div id="navigation">
  127.                 <div class="section">
  128.                     <?php print theme('links__system_main_menu', array('links' => $main_menu, 'attributes' => array('id' => 'main-menu', 'class' => array('links', 'inline', 'clearfix')), 'heading' => t('Main menu'))); ?>
  129.                     <?php print theme('links__system_secondary_menu', array('links' => $secondary_menu, 'attributes' => array('id' => 'secondary-menu', 'class' => array('links', 'inline', 'clearfix')), 'heading' => t('Secondary menu'))); ?>
  130.                 </div>
  131.             </div> <!-- /.section, /#navigation -->
  132.         <?php endif; ?>
  133.  
  134.         <div id="main-wrapper">
  135.             <div id="main" class="clearfix">
  136.                 <?php if ($page['content_left']): ?>
  137.                     <div id="content-left" class="column sidebar">
  138.                         <div class="section">
  139.                             <?php print render($page['content_left']); ?>
  140.                         </div>
  141.                     </div> <!-- /.section, /#content_left -->
  142.                 <?php endif; ?>
  143.                 <?php if ($page['content_right']): ?>
  144.                     <div id="content-right" class="column sidebar">
  145.                         <div class="section">
  146.                             <?php print render($page['content_right']); ?>
  147.                         </div>
  148.                     </div> <!-- /.section, /#content_left -->
  149.                 <?php endif; ?>
  150.                 <?php if ($page['content']): ?>
  151.                     <div id="content" class="column">
  152.                         <div class="section">
  153.                             <?php print $messages; ?>
  154.                             <?php if ($page['highlighted']): ?>
  155.                                 <div id="highlighted"><?php print render($page['highlighted']); ?></div><?php endif; ?>
  156.                             <div id="main-content">
  157.                                 <?php print render($title_prefix); ?>
  158.                                 <?php if ($title): ?><h1 class="title"
  159.                                                          id="page-title"><?php print $title; ?></h1><?php endif; ?>
  160.                                 <?php print render($title_suffix); ?>
  161.                                 <?php if ($tabs): ?>
  162.                                     <div class="tabs"><?php print render($tabs); ?></div><?php endif; ?>
  163.                                 <?php print render($page['help']); ?>
  164.                                 <?php if ($action_links): ?>
  165.                                     <ul class="action-links"><?php print render($action_links); ?></ul><?php endif; ?>
  166.                                 <?php print render($page['content']); ?>
  167.                                 <?php print $feed_icons; ?>
  168.                             </div>
  169.                         </div>
  170.                     </div> <!-- /.section, /#content_middle_main -->
  171.                 <?php endif; ?>
  172.             </div>
  173.         </div>
  174.         <!-- /#main, /#main-wrapper -->
  175.         <?php if ($page['spodni_textove_menu']): ?>
  176.             <div id="spodni-textove-menu" class="column sidebar">
  177.                 <div class="section">
  178.                     <?php print render($page['spodni_textove_menu']); ?>
  179.                 </div>
  180.             </div>
  181.         <?php endif; ?>
  182.         <div id="footer">
  183.             <div id="footerWrapper">
  184.                 <div class="section left">
  185.                     <?php print render($page['footer_left']); ?>
  186.                 </div>
  187.                 <div class="section center">
  188.                     <?php print render($page['footer']); ?>
  189.                 </div>
  190.                 <div class="section right">
  191.                     <?php print render($page['footer_right']); ?>
  192.                 </div>
  193.             </div>
  194.         </div>
  195.         <!-- /.section, /#footer -->
  196.  
  197.     </div>
  198. </div>
  199. <!-- /#page, /#page-wrapper -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement