Mywebdunia's Blog

Posts Tagged ‘drupal variables

Here is a list of drupal template variables that we commonly use in phptemplate variable page.

1.  $breadcrumb :  HTML for displaying the breadcrumbs at the top of the page.

2. $closure :  Needs to be displayed at the bottom of the page, for any dynamic javascript that needs to be called once the page has already been displayed.

3. $content :  The HTML content generated by Drupal to be displayed.

4. $footer_message : The footer message as defined in the admin settings.

5. $head :  HTML as generated by drupal_get_html_head().

6. $head_title : The text to be displayed in the page title.

7. $title :   Title, different from head_title, as this is just the node title most of the time.

8. $logo :  The path to the logo image, as defined in theme configuration.

9. $mission :  The text of the site mission.

10. $primary_links :  An array containing the links as they have been defined in the phptemplate specific configuration block.

11. $secondary_links :  An array containing the links as they have been defined in the phptemplate specific configuration block.

12. $sidebar_left :  The HTML for the left sidebar.

13. $sidebar_right :  The HTML for the right sidebar.

14. $site :  The name of the site, always filled in.

15. $site_name :  The site name of the site, to be used in the header, empty when display has been disabled.

16. $site_slogan :  The slogan of the site, empty when display has been disabled.

17. $styles :  Required for stylesheet switching to work. This prints out the style tags required.

18. $tabs :  HTML for displaying tabs at the top of the page.

19. $scripts  :  HTML to load the JavaScript files and make the JS settings available. Previously, javascript files are hardcoded into the page.tpl.php.

20.  $base_path:   Returns the base URL path of the Drupal installation. At the very least, this will always default to /.

21. $help :  Dynamic help text, mostly for admin pages.

22. $language :  The language the site is being displayed in.

23. $is_front  :  True if the front page is currently being displayed. Used to toggle the mission.

24. $node :  (5.x and after only) If you are in page.tpl.php displaying a node in full page view then $node is available to your template.

25. $layout :  This setting allows you to style different types of layout (‘none’, ‘left’, ‘right’ or ‘both’) differently, depending on how many sidebars are enabled.

26. $search_box :   True(1) if the search box has been enabled.


Categories