Template variables available in theme templates

Page Templates

  • $maincontent - This template variable holds the output from the current module.
  • $themepath - The path to the theme. This variable equates to themes/<theme name> without the trailing slash.
  • $imagepath - The path to images of the current theme. This variable equates to themes/<theme name>/images without the trailing slash. It it used in templates as
    <img src="<!--[$imagepath]-->/myimage.png" alt="" /> 
  • $stylepath - The path to stylesheets of the current theme. This variable equates to themes/<theme name>/style without the trailing slash so it it used in templates as
    <link rel="stylesheet" type="text/css" href="<!--[$stylepath]-->/style.css" /> 
  • $module - This variable holds the current module name.
  • $pagetype - This variable holds a simplified version of the page configuration selection system. This variable is useful in simple template logic structures inside page templates. It takes on one of following values.
    • home - if the name or module parameters are not specified in the URL.
    • admin - if the type parameter is admin or the entry point is admin.php.
    • module - in all other cases.
  • All theme variables listed in the theme admin panel are also available in page templates.

Block Templates

  • $title - The title of the block.
  • $content - The content of the block.
 
templating/themetemplatevariables.txt · Last modified: 2006/04/15 12:37 by craigh
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki