[ Index ]

PHP Cross Reference of Joomla 1.5.26 DE

title

Body

[close]

/templates/beez/html/ -> modules.php (source)

   1  <?php
   2  defined('_JEXEC') or die('Restricted access');
   3  
   4  /**
   5   * This is a file to add template specific chrome to module rendering.  To use it you would
   6   * set the style attribute for the given module(s) include in your template to use the style
   7   * for each given modChrome function.
   8   *
   9   * eg.  To render a module mod_test in the sliders style, you would use the following include:
  10   * <jdoc:include type="module" name="test" style="slider" />
  11   *
  12   * This gives template designers ultimate control over how modules are rendered.
  13   *
  14   * NOTICE: All chrome wrapping methods should be named: modChrome_{STYLE} and take the same
  15   * three arguments.
  16   */
  17  
  18  
  19  /**
  20   * Custom module chrome, echos the whole module in a <div> and the header in <h{x}>. The level of
  21   * the header can be configured through a 'headerLevel' attribute of the <jdoc:include /> tag.
  22   * Defaults to <h3> if none given
  23   */
  24  function modChrome_beezDivision($module, &$params, &$attribs)
  25  {
  26      $headerLevel = isset($attribs['headerLevel']) ? (int) $attribs['headerLevel'] : 3;
  27      if (!empty ($module->content)) : ?>
  28          <div class="moduletable<?php echo $params->get('moduleclass_sfx'); ?>">
  29              <?php if ($module->showtitle) : ?>
  30                  <h<?php echo $headerLevel; ?>><?php echo $module->title; ?></h<?php echo $headerLevel; ?>>
  31              <?php endif; ?>
  32              <?php echo $module->content; ?>
  33          </div>
  34      <?php endif;
  35  }


Generated: Wed Mar 28 15:54:07 2012 Cross-referenced by PHPXref 0.7.1