annotate modules/system/page.tpl.php @ 1:c1f4ac30525a 6.0

Drupal 6.0
author Franck Deroche <webmaster@defr.org>
date Tue, 23 Dec 2008 14:28:28 +0100
parents
children
rev   line source
webmaster@1 1 <?php
webmaster@1 2 // $Id: page.tpl.php,v 1.11 2008/01/24 09:42:51 goba Exp $
webmaster@1 3
webmaster@1 4 /**
webmaster@1 5 * @file page.tpl.php
webmaster@1 6 *
webmaster@1 7 * Theme implementation to display a single Drupal page.
webmaster@1 8 *
webmaster@1 9 * Available variables:
webmaster@1 10 *
webmaster@1 11 * General utility variables:
webmaster@1 12 * - $base_path: The base URL path of the Drupal installation. At the very
webmaster@1 13 * least, this will always default to /.
webmaster@1 14 * - $css: An array of CSS files for the current page.
webmaster@1 15 * - $directory: The directory the theme is located in, e.g. themes/garland or
webmaster@1 16 * themes/garland/minelli.
webmaster@1 17 * - $is_front: TRUE if the current page is the front page. Used to toggle the mission statement.
webmaster@1 18 * - $logged_in: TRUE if the user is registered and signed in.
webmaster@1 19 * - $is_admin: TRUE if the user has permission to access administration pages.
webmaster@1 20 *
webmaster@1 21 * Page metadata:
webmaster@1 22 * - $language: (object) The language the site is being displayed in.
webmaster@1 23 * $language->language contains its textual representation.
webmaster@1 24 * $language->dir contains the language direction. It will either be 'ltr' or 'rtl'.
webmaster@1 25 * - $head_title: A modified version of the page title, for use in the TITLE tag.
webmaster@1 26 * - $head: Markup for the HEAD section (including meta tags, keyword tags, and
webmaster@1 27 * so on).
webmaster@1 28 * - $styles: Style tags necessary to import all CSS files for the page.
webmaster@1 29 * - $scripts: Script tags necessary to load the JavaScript files and settings
webmaster@1 30 * for the page.
webmaster@1 31 * - $body_classes: A set of CSS classes for the BODY tag. This contains flags
webmaster@1 32 * indicating the current layout (multiple columns, single column), the current
webmaster@1 33 * path, whether the user is logged in, and so on.
webmaster@1 34 *
webmaster@1 35 * Site identity:
webmaster@1 36 * - $front_page: The URL of the front page. Use this instead of $base_path,
webmaster@1 37 * when linking to the front page. This includes the language domain or prefix.
webmaster@1 38 * - $logo: The path to the logo image, as defined in theme configuration.
webmaster@1 39 * - $site_name: The name of the site, empty when display has been disabled
webmaster@1 40 * in theme settings.
webmaster@1 41 * - $site_slogan: The slogan of the site, empty when display has been disabled
webmaster@1 42 * in theme settings.
webmaster@1 43 * - $mission: The text of the site mission, empty when display has been disabled
webmaster@1 44 * in theme settings.
webmaster@1 45 *
webmaster@1 46 * Navigation:
webmaster@1 47 * - $search_box: HTML to display the search box, empty if search has been disabled.
webmaster@1 48 * - $primary_links (array): An array containing primary navigation links for the
webmaster@1 49 * site, if they have been configured.
webmaster@1 50 * - $secondary_links (array): An array containing secondary navigation links for
webmaster@1 51 * the site, if they have been configured.
webmaster@1 52 *
webmaster@1 53 * Page content (in order of occurrance in the default page.tpl.php):
webmaster@1 54 * - $left: The HTML for the left sidebar.
webmaster@1 55 *
webmaster@1 56 * - $breadcrumb: The breadcrumb trail for the current page.
webmaster@1 57 * - $title: The page title, for use in the actual HTML content.
webmaster@1 58 * - $help: Dynamic help text, mostly for admin pages.
webmaster@1 59 * - $messages: HTML for status and error messages. Should be displayed prominently.
webmaster@1 60 * - $tabs: Tabs linking to any sub-pages beneath the current page (e.g., the view
webmaster@1 61 * and edit tabs when displaying a node).
webmaster@1 62 *
webmaster@1 63 * - $content: The main content of the current Drupal page.
webmaster@1 64 *
webmaster@1 65 * - $right: The HTML for the right sidebar.
webmaster@1 66 *
webmaster@1 67 * Footer/closing data:
webmaster@1 68 * - $feed_icons: A string of all feed icons for the current page.
webmaster@1 69 * - $footer_message: The footer message as defined in the admin settings.
webmaster@1 70 * - $footer : The footer region.
webmaster@1 71 * - $closure: Final closing markup from any modules that have altered the page.
webmaster@1 72 * This variable should always be output last, after all other dynamic content.
webmaster@1 73 *
webmaster@1 74 * @see template_preprocess()
webmaster@1 75 * @see template_preprocess_page()
webmaster@1 76 */
webmaster@1 77 ?>
webmaster@1 78 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
webmaster@1 79 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
webmaster@1 80 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language ?>" lang="<?php print $language->language ?>" dir="<?php print $language->dir ?>">
webmaster@1 81
webmaster@1 82 <head>
webmaster@1 83 <title><?php print $head_title; ?></title>
webmaster@1 84 <?php print $head; ?>
webmaster@1 85 <?php print $styles; ?>
webmaster@1 86 <?php print $scripts; ?>
webmaster@1 87 <script type="text/javascript"><?php /* Needed to avoid Flash of Unstyled Content in IE */ ?> </script>
webmaster@1 88 </head>
webmaster@1 89 <body class="<?php print $body_classes; ?>">
webmaster@1 90 <div id="page">
webmaster@1 91 <div id="header">
webmaster@1 92 <div id="logo-title">
webmaster@1 93
webmaster@1 94 <?php if (!empty($logo)): ?>
webmaster@1 95 <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home" id="logo">
webmaster@1 96 <img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" />
webmaster@1 97 </a>
webmaster@1 98 <?php endif; ?>
webmaster@1 99
webmaster@1 100 <div id="name-and-slogan">
webmaster@1 101 <?php if (!empty($site_name)): ?>
webmaster@1 102 <h1 id="site-name">
webmaster@1 103 <a href="<?php print $front_page ?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a>
webmaster@1 104 </h1>
webmaster@1 105 <?php endif; ?>
webmaster@1 106
webmaster@1 107 <?php if (!empty($site_slogan)): ?>
webmaster@1 108 <div id="site-slogan"><?php print $site_slogan; ?></div>
webmaster@1 109 <?php endif; ?>
webmaster@1 110 </div> <!-- /name-and-slogan -->
webmaster@1 111 </div> <!-- /logo-title -->
webmaster@1 112
webmaster@1 113 <?php if (!empty($search_box)): ?>
webmaster@1 114 <div id="search-box"><?php print $search_box; ?></div>
webmaster@1 115 <?php endif; ?>
webmaster@1 116
webmaster@1 117 <?php if (!empty($header)): ?>
webmaster@1 118 <div id="header-region">
webmaster@1 119 <?php print $header; ?>
webmaster@1 120 </div>
webmaster@1 121 <?php endif; ?>
webmaster@1 122
webmaster@1 123 </div> <!-- /header -->
webmaster@1 124
webmaster@1 125 <div id="container" class="clear-block">
webmaster@1 126
webmaster@1 127 <div id="navigation" class="menu <?php if (!empty($primary_links)) { print "withprimary"; } if (!empty($secondary_links)) { print " withsecondary"; } ?> ">
webmaster@1 128 <?php if (!empty($primary_links)): ?>
webmaster@1 129 <div id="primary" class="clear-block">
webmaster@1 130 <?php print theme('links', $primary_links, array('class' => 'links primary-links')); ?>
webmaster@1 131 </div>
webmaster@1 132 <?php endif; ?>
webmaster@1 133
webmaster@1 134 <?php if (!empty($secondary_links)): ?>
webmaster@1 135 <div id="secondary" class="clear-block">
webmaster@1 136 <?php print theme('links', $secondary_links, array('class' => 'links secondary-links')); ?>
webmaster@1 137 </div>
webmaster@1 138 <?php endif; ?>
webmaster@1 139 </div> <!-- /navigation -->
webmaster@1 140
webmaster@1 141 <?php if (!empty($left)): ?>
webmaster@1 142 <div id="sidebar-left" class="column sidebar">
webmaster@1 143 <?php print $left; ?>
webmaster@1 144 </div> <!-- /sidebar-left -->
webmaster@1 145 <?php endif; ?>
webmaster@1 146
webmaster@1 147 <div id="main" class="column"><div id="main-squeeze">
webmaster@1 148 <?php if (!empty($breadcrumb)): ?><div id="breadcrumb"><?php print $breadcrumb; ?></div><?php endif; ?>
webmaster@1 149 <?php if (!empty($mission)): ?><div id="mission"><?php print $mission; ?></div><?php endif; ?>
webmaster@1 150
webmaster@1 151 <div id="content">
webmaster@1 152 <?php if (!empty($title)): ?><h1 class="title" id="page-title"><?php print $title; ?></h1><?php endif; ?>
webmaster@1 153 <?php if (!empty($tabs)): ?><div class="tabs"><?php print $tabs; ?></div><?php endif; ?>
webmaster@1 154 <?php if (!empty($messages)): print $messages; endif; ?>
webmaster@1 155 <?php if (!empty($help)): print $help; endif; ?>
webmaster@1 156 <div id="content-content" class="clear-block">
webmaster@1 157 <?php print $content; ?>
webmaster@1 158 </div> <!-- /content-content -->
webmaster@1 159 <?php print $feed_icons; ?>
webmaster@1 160 </div> <!-- /content -->
webmaster@1 161
webmaster@1 162 </div></div> <!-- /main-squeeze /main -->
webmaster@1 163
webmaster@1 164 <?php if (!empty($right)): ?>
webmaster@1 165 <div id="sidebar-right" class="column sidebar">
webmaster@1 166 <?php print $right; ?>
webmaster@1 167 </div> <!-- /sidebar-right -->
webmaster@1 168 <?php endif; ?>
webmaster@1 169
webmaster@1 170 </div> <!-- /container -->
webmaster@1 171
webmaster@1 172 <div id="footer-wrapper">
webmaster@1 173 <div id="footer">
webmaster@1 174 <?php print $footer_message; ?>
webmaster@1 175 <?php if (!empty($footer)): print $footer; endif; ?>
webmaster@1 176 </div> <!-- /footer -->
webmaster@1 177 </div> <!-- /footer-wrapper -->
webmaster@1 178
webmaster@1 179 <?php print $closure; ?>
webmaster@1 180
webmaster@1 181 </div> <!-- /page -->
webmaster@1 182
webmaster@1 183 </body>
webmaster@1 184 </html>