Archive for May, 2010

important variables to be added to page.tpl.php

importent variables to be added to page.tpl.php

$base_path: The base path of the Drupal installation. At the very least, this will always
default to / if Drupal is installed in a root directory.

$breadcrumb: Returns the HTML for displaying the navigational breadcrumbs on the
page.

$closure: Returns the output of hook_footer() and thus is usually displayed at the bottom
of the page, just before the close of the body tag. hook_footer() is used to allow
modules to insert HTML or JavaScript at the end of a page. Note that drupal_add_js()
will not work in hook_footer().

$content: Returns the HTML content to be displayed. Examples include a node, an
aggregation of nodes, the content of the administrative interface, and so on.

$css: Returns an array structure of all the CSS files to be added to the page. Use $styles
if you are looking for the HTML version of the $css array.

$directory: The relative path to the directory the theme is located in; for example,
themes/bluemarine or sites/all/themes/custom/greyscale. You’ll commonly use this
variable in conjunction with the $base_path variable to build the absolute path to your
site’s theme:
<?php print $base_path . $directory ?>
will resolve to
<?php print ‘/’ . ’sites/all/themes/custom/greyscale’ ?>

$feed_icons: Returns RSS feed links for the page. RSS feed links are added via
drupal_add_feed().

$footer: Returns the HTML for the footer region, including the HTML for blocks
belonging to this region. Do not confuse this with hook_footer(), which is a Drupal
hook that lets modules add HTML or JavaScript that will appear in the $closure variable
just before the closing body tag

$footer_message: Returns the text of the footer message that was entered at Administer
ä Site configuration ä Site information.

$front_page: The output of url() with no parameters; for example, /drupal/.
Use $front_page instead of $base_path when linking to the front page of a site, because
$front_page will include the language domain and prefix when applicable

$head: Returns the HTML to be placed within the <head></head> section. Modules
append to $head by calling drupal_set_html_head() to add additional markup.

$head_title: The text to be displayed in the page title, between the HTML
<title></title> tags. It is retrieved using drupal_get_title().

$header: Returns the HTML for the header region, including the HTML for blocks
belonging to this region.

$is_front: TRUE if the front page is currently being displayed

$left: Returns the HTML for the left sidebar, including the HTML for blocks belonging
to this region.

$logged_in: TRUE if the current user is logged in; FALSE otherwise.

$logo: The path to the logo image, as defined in the theme configuration page of
enabled themes. It’s used as follows in Drupal’s default page template:
<img src=”<?php print $logo; ?>” alt=”<?php print t(‘Home’); ?>” />

$messages: This variable returns the HTML for validation errors, success notices for
forms, and other messages as well. It’s usually displayed at the top of the page.

$mission: Returns the text of the site mission that was entered at Administer ä Site configuration
ä Site information. This variable is only populated when $is_front is TRUE.

$primary_links: An array containing the primary links as they have been defined at
Administer ä Site building äMenus. Usually $primary_links is styled through the
theme(‘links’) function as follows:
<?php
print theme(‘links’, $primary_links, array(‘class’ => å
‘links primary-links’))
?>

$secondary_links: An array containing the secondary links as they have been defined at
Administer ä Site building äMenus. Usually $secondary_links is styled through the
theme(‘links’) function as follows: and are placed beneath primary links as they are the sub links for them
<?php
print theme(‘links’, $secondary_links, array(‘class’ => å
‘links primary-links’))
?>

$site_name: The name of the site, which is set at Administer ä Site configuration ä Site
information. $site_name is empty when the administrator has disabled the display on
the theme configuration page of enabled themes.

$site_slogan: The slogan of the site, which is set at Administer ä Site configuration ä
Site information. $site_slogan is empty when the administrator has disabled the display
of the slogan on the theme configuration page of enabled themes.

$styles: Returns the HTML for linking to the necessary CSS files to the page. CSS files
are added to the $styles variable through drupal_add_css().

$tabs: Returns the HTML for displaying tabs such as the View/Edit tabs for nodes. Tabs
are usually at the top of the page in Drupal’s core themes

$title: The main content title, different from $head_title. When on a single node view
page $title is the title of the node. When viewing Drupal’s administration pages,
$title is usually set by the menu item that corresponds to the page being viewed

access config variables

to access config variables we put it like this
add the variable to configruation.php
$my_variable
then
$GLOBALS['mosConfig_my_variable']

Return top

INFORMATION

Change this sentence and title from admin Theme option page.