Guest User

Untitled

a guest
Oct 21st, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 6.77 KB | None | 0 0
  1. <?php
  2. /**
  3.  * @file
  4.  * Zen theme's implementation to display a single Drupal page.
  5.  *
  6.  * Available variables:
  7.  *
  8.  * General utility variables:
  9.  * - $base_path: The base URL path of the Drupal installation. At the very
  10.  *   least, this will always default to /.
  11.  * - $directory: The directory the template is located in, e.g. modules/system
  12.  *   or themes/garland.
  13.  * - $is_front: TRUE if the current page is the front page.
  14.  * - $logged_in: TRUE if the user is registered and signed in.
  15.  * - $is_admin: TRUE if the user has permission to access administration pages.
  16.  *
  17.  * Site identity:
  18.  * - $front_page: The URL of the front page. Use this instead of $base_path,
  19.  *   when linking to the front page. This includes the language domain or
  20.  *   prefix.
  21.  * - $logo: The path to the logo image, as defined in theme configuration.
  22.  * - $site_name: The name of the site, empty when display has been disabled
  23.  *   in theme settings.
  24.  * - $site_slogan: The slogan of the site, empty when display has been disabled
  25.  *   in theme settings.
  26.  *
  27.  * Navigation:
  28.  * - $main_menu (array): An array containing the Main menu links for the
  29.  *   site, if they have been configured.
  30.  * - $secondary_menu (array): An array containing the Secondary menu links for
  31.  *   the site, if they have been configured.
  32.  * - $secondary_menu_heading: The title of the menu used by the secondary links.
  33.  * - $breadcrumb: The breadcrumb trail for the current page.
  34.  *
  35.  * Page content (in order of occurrence in the default page.tpl.php):
  36.  * - $title_prefix (array): An array containing additional output populated by
  37.  *   modules, intended to be displayed in front of the main title tag that
  38.  *   appears in the template.
  39.  * - $title: The page title, for use in the actual HTML content.
  40.  * - $title_suffix (array): An array containing additional output populated by
  41.  *   modules, intended to be displayed after the main title tag that appears in
  42.  *   the template.
  43.  * - $messages: HTML for status and error messages. Should be displayed
  44.  *   prominently.
  45.  * - $tabs (array): Tabs linking to any sub-pages beneath the current page
  46.  *   (e.g., the view and edit tabs when displaying a node).
  47.  * - $action_links (array): Actions local to the page, such as 'Add menu' on the
  48.  *   menu administration interface.
  49.  * - $feed_icons: A string of all feed icons for the current page.
  50.  * - $node: The node object, if there is an automatically-loaded node
  51.  *   associated with the page, and the node ID is the second argument
  52.  *   in the page's path (e.g. node/12345 and node/12345/revisions, but not
  53.  *   comment/reply/12345).
  54.  *
  55.  * Regions:
  56.  * - $page['help']: Dynamic help text, mostly for admin pages.
  57.  * - $page['highlighted']: Items for the highlighted content region.
  58.  * - $page['content']: The main content of the current page.
  59.  * - $page['sidebar_first']: Items for the first sidebar.
  60.  * - $page['sidebar_second']: Items for the second sidebar.
  61.  * - $page['header']: Items for the header region.
  62.  * - $page['footer']: Items for the footer region.
  63.  * - $page['bottom']: Items to appear at the bottom of the page below the footer.
  64.  *
  65.  * @see template_preprocess()
  66.  * @see template_preprocess_page()
  67.  * @see zen_preprocess_page()
  68.  * @see template_process()
  69.  */
  70. ?>
  71.  
  72. <div id="page-wrapper"><div id="page">
  73.  
  74.   <div id="header"><div class="section clearfix">
  75.  
  76.     <?php if ($logo): ?>
  77.       <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home" id="logo"><img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" /></a>
  78.     <?php endif; ?>
  79.  
  80.     <?php if ($site_name || $site_slogan): ?>
  81.       <div id="name-and-slogan">
  82.         <?php if ($site_name): ?>
  83.           <?php if ($title): ?>
  84.             <div id="site-name"><strong>
  85.               <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a>
  86.             </strong></div>
  87.           <?php else: /* Use h1 when the content title is empty */ ?>
  88.             <h1 id="site-name">
  89.               <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a>
  90.             </h1>
  91.           <?php endif; ?>
  92.         <?php endif; ?>
  93.  
  94.         <?php if ($site_slogan): ?>
  95.           <div id="site-slogan"><?php print $site_slogan; ?></div>
  96.         <?php endif; ?>
  97.       </div><!-- /#name-and-slogan -->
  98.     <?php endif; ?>
  99.  
  100.     <?php print theme('links__system_secondary_menu', array(
  101.       'links' => $secondary_menu,
  102.       'attributes' => array(
  103.         'id' => 'secondary-menu',
  104.         'class' => array('links', 'inline', 'clearfix'),
  105.       ),
  106.       'heading' => array(
  107.         'text' => $secondary_menu_heading,
  108.         'level' => 'h2',
  109.         'class' => array('element-invisible'),
  110.       ),
  111.     )); ?>
  112.  
  113.     <?php print render($page['header']); ?>
  114.  
  115.   </div></div><!-- /.section, /#header -->
  116.  
  117.   <div id="main-wrapper"><div id="main" class="clearfix<?php if ($main_menu || $page['navigation']) { print ' with-navigation'; } ?>">
  118.  
  119.     <div id="content" class="column"><div class="section">
  120.       <?php print render($page['highlighted']); ?>
  121.       <?php print $breadcrumb; ?>
  122.       <a id="main-content"></a>
  123.       <?php print render($title_prefix); ?>
  124.       <?php if ($title): ?>
  125.         <h1 class="title" id="page-title"><?php print $title; ?></h1>
  126.       <?php endif; ?>
  127.       <?php print render($title_suffix); ?>
  128.       <?php print $messages; ?>
  129.       <?php if ($tabs = render($tabs)): ?>
  130.         <div class="tabs"><?php print $tabs; ?></div>
  131.       <?php endif; ?>
  132.       <?php print render($page['help']); ?>
  133.       <?php if ($action_links): ?>
  134.         <ul class="action-links"><?php print render($action_links); ?></ul>
  135.       <?php endif; ?>
  136.       <?php print render($page['content']); ?>
  137.       <?php print $feed_icons; ?>
  138.     </div></div><!-- /.section, /#content -->
  139.  
  140.     <?php if ($page['navigation'] || $main_menu): ?>
  141.       <div id="navigation"><div class="section clearfix">
  142.  
  143.         <?php print theme('links__system_main_menu', array(
  144.           'links' => $main_menu,
  145.           'attributes' => array(
  146.             'id' => 'main-menu',
  147.             'class' => array('links', 'inline', 'clearfix'),
  148.           ),
  149.           'heading' => array(
  150.             'text' => t('Main menu'),
  151.             'level' => 'h2',
  152.             'class' => array('element-invisible'),
  153.           ),
  154.         )); ?>
  155.  
  156.         <?php print render($page['navigation']); ?>
  157.  
  158.       </div></div><!-- /.section, /#navigation -->
  159.     <?php endif; ?>
  160.  
  161.     <?php print render($page['sidebar_first']); ?>
  162.  
  163.     <?php print render($page['sidebar_second']); ?>
  164.  
  165.   </div></div><!-- /#main, /#main-wrapper -->
  166.  
  167.   <?php print render($page['footer']); ?>
  168.  
  169. </div></div><!-- /#page, /#page-wrapper -->
  170.  
  171. <?php print render($page['bottom']); ?>
Add Comment
Please, Sign In to add comment