Overriding joomla Menu module
- July 9th, 2008
- Posted in Joomla
- Write comment
To override joomla menu module (whether its left or right or upper one ) you have to copy the following file :
/templates/system/html/modules.php
to your template
/templates/yourtemplate/html/modules.php
and overright the function you want.
ofcourse you can also create your own menu module just you add a function to modules.php
/*
* Module chrome that wraps the module in a definition list
*/
function modChrome_dlist($module, &$params, &$attribs)
{ ?>
<dl class="<?php echo $params->get('moduleclass_sfx'); ?>">
<?php if ($module->showtitle != 0) : ?>
<dt>
<?php echo $module->title; ?>
</dt>
<?php endif; ?>
<dd>
<?php echo $module->content; ?>
</dd>
</dl>
<?php
}
then you can add this when calling the menu module
<jdoc:include type="modules" name="left" style="dlist" />
the default styles are :
- table (was 0 and is the default)
- horz (was 1)
- none (was -1)
- xhtml (was -2)
- rounded (was -3)
- outline (new – used to preview module positions – see screenshot above)
was before :
- 0 (the default) displayed modules in a vertical table
- 1 displayed them in a horizontal table
- -1 displayed the raw module output
- -2 displayed the modules in a XHTML compatible format with the title in a H3 tag.
- -3 displayed modules in a set of nested DIVs that allowed for rounded-corner techniques
No comments yet.