Advertisement
DrupalCustom

tpl

Mar 10th, 2012
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.37 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.  
  81.  
  82.  
  83.     <?php print render($page['header']); ?>
  84.  
  85.   </div></div><!-- /.section, /#header -->
  86.  
  87.   <div id="main-wrapper"><div id="main" class="clearfix<?php if ($main_menu || $page['navigation']) { print ' with-navigation'; } ?>">
  88.  
  89.       <?php if ($page['navigation'] || $main_menu): ?>
  90.       <div id="navigation"><div class="section clearfix">
  91.  
  92.         <?php print theme('links__system_main_menu', array(
  93.           'links' => $main_menu,
  94.           'attributes' => array(
  95.             'id' => 'main-menu',
  96.             'class' => array('links', 'inline', 'clearfix'),
  97.           ),
  98.           'heading' => array(
  99.             'text' => t('Main menu'),
  100.             'level' => 'h2',
  101.             'class' => array('element-invisible'),
  102.           ),
  103.         )); ?>
  104.  
  105.         <?php print render($page['navigation']); ?>
  106.  
  107.       </div></div><!-- /.section, /#navigation -->
  108.     <?php endif; ?>
  109.     <div id ="highlighted">
  110.      <?php print render($page['highlighted']); ?>
  111.    </div>
  112.     <div id="content" class="column"><div class="section">
  113.      
  114.       <?php print $breadcrumb; ?>
  115.       <a id="main-content"></a>
  116.  
  117.       <?php print $messages; ?>
  118.       <?php if ($tabs = render($tabs)): ?>
  119.         <div class="tabs"><?php print $tabs; ?></div>
  120.       <?php endif; ?>
  121.       <?php print render($page['help']); ?>
  122.       <?php if ($action_links): ?>
  123.         <ul class="action-links"><?php print render($action_links); ?></ul>
  124.       <?php endif; ?>
  125.       <?php print render($page['content']); ?>
  126.       <?php print $feed_icons; ?>
  127.     </div></div><!-- /.section, /#content -->
  128.  
  129.  
  130.  
  131.     <?php print render($page['sidebar_first']); ?>
  132.  
  133.     <?php print render($page['sidebar_second']); ?>
  134.  
  135.   </div></div><!-- /#main, /#main-wrapper -->
  136.  
  137.   <?php print render($page['footer']); ?>
  138.  
  139. </div></div><!-- /#page, /#page-wrapper -->
  140.  
  141. <?php print render($page['bottom']); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement