| 1 |
<?php
|
| 2 |
// $Id: page.tpl.php,v 1.36 2009/10/09 01:00:05 dries Exp $
|
| 3 |
|
| 4 |
/**
|
| 5 |
* @file
|
| 6 |
* Default theme implementation to display a single Drupal page.
|
| 7 |
*
|
| 8 |
* Available variables:
|
| 9 |
*
|
| 10 |
* General utility variables:
|
| 11 |
* - $base_path: The base URL path of the Drupal installation. At the very
|
| 12 |
* least, this will always default to /.
|
| 13 |
* - $directory: The directory the template is located in, e.g. modules/system
|
| 14 |
* or themes/garland.
|
| 15 |
* - $is_front: TRUE if the current page is the front page. Used to toggle the mission statement.
|
| 16 |
* - $logged_in: TRUE if the user is registered and signed in.
|
| 17 |
* - $is_admin: TRUE if the user has permission to access administration pages.
|
| 18 |
*
|
| 19 |
* Site identity:
|
| 20 |
* - $front_page: The URL of the front page. Use this instead of $base_path,
|
| 21 |
* when linking to the front page. This includes the language domain or prefix.
|
| 22 |
* - $logo: The path to the logo image, as defined in theme configuration.
|
| 23 |
* - $site_name: The name of the site, empty when display has been disabled
|
| 24 |
* in theme settings.
|
| 25 |
* - $site_slogan: The slogan of the site, empty when display has been disabled
|
| 26 |
* in theme settings.
|
| 27 |
*
|
| 28 |
* Navigation:
|
| 29 |
* - $main_menu (array): An array containing the Main menu links for the
|
| 30 |
* site, if they have been configured.
|
| 31 |
* - $secondary_menu (array): An array containing the Secondary menu links for
|
| 32 |
* the site, if they have been configured.
|
| 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: The page title, for use in the actual HTML content.
|
| 37 |
* - $messages: HTML for status and error messages. Should be displayed prominently.
|
| 38 |
* - $tabs (array): Tabs linking to any sub-pages beneath the current page
|
| 39 |
* (e.g., the view and edit tabs when displaying a node).
|
| 40 |
* - $action_links (array): Actions local to the page, such as 'Add menu' on the
|
| 41 |
* menu administration interface.
|
| 42 |
* - $feed_icons: A string of all feed icons for the current page.
|
| 43 |
*
|
| 44 |
* Regions:
|
| 45 |
* - $page['help']: Dynamic help text, mostly for admin pages.
|
| 46 |
* - $page['highlight']: Items for the highlighted content region.
|
| 47 |
* - $page['content']: The main content of the current page.
|
| 48 |
* - $page['sidebar_first']: Items for the first sidebar.
|
| 49 |
* - $page['sidebar_second']: Items for the second sidebar.
|
| 50 |
* - $page['header']: Items for the header region.
|
| 51 |
* - $page['footer']: Items for the footer region.
|
| 52 |
*
|
| 53 |
* @see template_preprocess()
|
| 54 |
* @see template_preprocess_page()
|
| 55 |
* @see template_process()
|
| 56 |
*/
|
| 57 |
?>
|
| 58 |
|
| 59 |
<div id="page-wrapper"><div id="page">
|
| 60 |
|
| 61 |
<div id="header"><div class="section clearfix">
|
| 62 |
|
| 63 |
<?php if ($logo): ?>
|
| 64 |
<a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home" id="logo">
|
| 65 |
<img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" />
|
| 66 |
</a>
|
| 67 |
<?php endif; ?>
|
| 68 |
|
| 69 |
<?php if ($site_name || $site_slogan): ?>
|
| 70 |
<div id="name-and-slogan">
|
| 71 |
<?php if ($site_name): ?>
|
| 72 |
<?php if ($title): ?>
|
| 73 |
<div id="site-name"><strong>
|
| 74 |
<a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a>
|
| 75 |
</strong></div>
|
| 76 |
<?php else: /* Use h1 when the content title is empty */ ?>
|
| 77 |
<h1 id="site-name">
|
| 78 |
<a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a>
|
| 79 |
</h1>
|
| 80 |
<?php endif; ?>
|
| 81 |
<?php endif; ?>
|
| 82 |
|
| 83 |
<?php if ($site_slogan): ?>
|
| 84 |
<div id="site-slogan"><?php print $site_slogan; ?></div>
|
| 85 |
<?php endif; ?>
|
| 86 |
</div> <!-- /#name-and-slogan -->
|
| 87 |
<?php endif; ?>
|
| 88 |
|
| 89 |
<?php print render($page['header']); ?>
|
| 90 |
|
| 91 |
</div></div> <!-- /.section, /#header -->
|
| 92 |
|
| 93 |
<?php if ($main_menu): ?>
|
| 94 |
<div id="navigation"><div class="section">
|
| 95 |
<?php print theme('links', array('links' => $main_menu, 'attributes' => array('id' => 'main-menu', 'class' => array('links', 'clearfix')), 'heading' => t('Main menu'))); ?>
|
| 96 |
</div></div> <!-- /.section, /#navigation -->
|
| 97 |
<?php endif; ?>
|
| 98 |
|
| 99 |
<?php if ($breadcrumb): ?>
|
| 100 |
<div id="breadcrumb"><?php print $breadcrumb; ?></div>
|
| 101 |
<?php endif; ?>
|
| 102 |
|
| 103 |
<?php print $messages; ?>
|
| 104 |
|
| 105 |
<div id="main-wrapper"><div id="main" class="clearfix">
|
| 106 |
|
| 107 |
<div id="content" class="column"><div class="section">
|
| 108 |
<?php if ($page['highlight']): ?><div id="highlight"><?php print render($page['highlight']); ?></div><?php endif; ?>
|
| 109 |
<?php if ($title): ?><h1 class="title" id="page-title"><?php print $title; ?></h1><?php endif; ?>
|
| 110 |
<?php if ($tabs): ?><div class="tabs"><?php print render($tabs); ?></div><?php endif; ?>
|
| 111 |
<?php print render($page['help']); ?>
|
| 112 |
<?php if ($action_links): ?><ul class="action-links"><?php print render($action_links); ?></ul><?php endif; ?>
|
| 113 |
<?php print render($page['content']); ?>
|
| 114 |
<?php print $feed_icons; ?>
|
| 115 |
</div></div> <!-- /.section, /#content -->
|
| 116 |
|
| 117 |
<?php if ($page['sidebar_first']): ?>
|
| 118 |
<div id="sidebar-first" class="column sidebar"><div class="section">
|
| 119 |
<?php print render($page['sidebar_first']); ?>
|
| 120 |
</div></div> <!-- /.section, /#sidebar-first -->
|
| 121 |
<?php endif; ?>
|
| 122 |
|
| 123 |
<?php if ($page['sidebar_second']): ?>
|
| 124 |
<div id="sidebar-second" class="column sidebar"><div class="section">
|
| 125 |
<?php print render($page['sidebar_second']); ?>
|
| 126 |
</div></div> <!-- /.section, /#sidebar-second -->
|
| 127 |
<?php endif; ?>
|
| 128 |
|
| 129 |
</div></div> <!-- /#main, /#main-wrapper -->
|
| 130 |
|
| 131 |
<div id="footer"><div class="section">
|
| 132 |
<?php print theme('links', array('links' => $secondary_menu, 'attributes' => array('id' => 'secondary-menu', 'class' => array('links', 'clearfix')), 'heading' => t('Secondary menu'))); ?>
|
| 133 |
<?php print render($page['footer']); ?>
|
| 134 |
</div></div> <!-- /.section, /#footer -->
|
| 135 |
|
| 136 |
</div></div> <!-- /#page, /#page-wrapper -->
|