168 CHAPTER 5 ADDING AND CUSTOMIZING THEMES Table 5-8. Continued Variable Description $head_title The page s title, for display in the
tag. The $head_title variable is constructed either from $title and $site_name or $site_name and $site_slogan. $help Help text for the page, if it is available. $language The two-letter language code based on the locale in which the site is being displayed; for example, en for English or de for German. $layout A string (’left’, ‘right’, ‘both’, or empty) that indicates if and where blocks are found for this page. The idea is that the template can check which layout is being demanded and react accordingly. $logo The path to the image to be used as the site logo. $messages Status and error messages to the user. $mission The text of the mission statement as defined by the Mission field on the admin/settings page. $onload_attributes HTML code added inside the opening tag of the page. Its main purpose is to expose the onload parameter of the tag to modules so that they can trigger events when the page is loaded in the browser. This is the mechanism that allows the WYSIWYG editors like TinyMCE to function properly; the JavaScript that loads the editors will be embedded in $onload_attributes. $primary_links An array of links that are defined in the Primary Link Settings field of the admin/themes/settings page. $search_box The HTML to render the search box, if it is enabled. $secondary_links An array of links that are defined in the Secondary Link Settings field of the admin/themes/settings page. $sidebar_left HTML to render the left sidebar. $sidebar_right HTML to render the right sidebar. $site_name The name of the site, as specified by you from the admin/settings page. $site_slogan The text for the site slogan that is defined on the admin/settings page. $styles HTML for the tag of the page that consists of style sheet imports in the correct order. $tabs HTML to render tabbed navigation for a page. An example of this is the view and edit tabs that are visible on node pages (when you re logged in and have the right privileges). $title The title of this page. The PHPTemplate theme engine does not provide a page.tpl.php implementation; this is the realm of the individual themes. The page.tpl.php file provided by the Bluemarine theme is a good example of what needs to happen and what issues need to be addressed. As the file is relatively long, I ll discuss only excerpts here. The first two lines are the DOCTYPE declaration and the opening tag. Noteworthy is that the document is declared to be XHTML 1.0 STRICT and that the lang and xml:lang parameters of the tag are both set dynamically using the $language variable provided to the template.
Note: In case you are looking for affordable and reliable webhost to host and run your business application check Vision
php5 hosting services
This entry was posted
on Wednesday, May 2nd, 2007 at 4:10 am and is filed under MySQL5.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.