Archive for July 9th, 2008

Cheat Sheet

Using the rhuk_milkyway template as an example, here is a brief summary of the priniciples we’ve looked at.

Customise the Component Output

To override a component layout (for example the default layout in the article view), copy:

/components/com_content/views/article/tmpl/default.php

to:

/templates/rhuk_milkyway/html/com_content/article/default.php

Read more about component output.

Customise the Module Output

To override a module layout (for example the Latest News module using the rhuk_milkyway template), copy:

/components/mod_latest_news/default.php

to:

/templates/rhuk_milkyway/html/mod_latest_news/default.php

Read more about module output.

Add New Module Styles

To add new module styles (chrome), add them to the following file:

/templates/rhuk_milkyway/html/modules.php

Read more about module styles.

Customise the Pagination Links

To customise the way the items-per-page selector and pagination links display, edit the following file:

/templates/rhuk_milkyway/html/pagination.php

Read more about pagination.

Overriding joomla Menu module

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

            
Return top

INFORMATION

Change this sentence and title from admin Theme option page.