Joomla Template Customization

February 13, 2007 by hejian

Loads the modules in the specified position

Joomla provide a function to loads the modules in the specified position:

void mosLoadModules ( [ string $position [, int $style ]] )

$position is a string containing the position for which to load the modules.
$style is an integer containing the style in which to display the modules.

There are five styles:

1 = horizontal
display the modules in a row. Each module is displayed in the cell of a wrapper table.

<table cellpadding="0" cellspacing="0" class="moduletable[suffix]“>
<tr>
<th valign=”top”>Module Title</th>
</tr>
<tr>
<td>
Module output
</td>
</tr>
</table>

0 = normal
display the modules in a column.

<table cellspacing="1" cellpadding="0" border="0" width="100%">
<tr>
<td align="top">
<!-- Individual module -->
<table cellpadding="0" cellspacing="0" class="moduletable[suffix]“>
<tr>
<th valign=”top”>Module Title</th>
</tr>
<tr>
<td>
Module output
</td>
</tr>
</table>
<!– Individual module end –>
</td>
<td align=”top”>
<!– …the next module… –>
</td>
</tr>
</table>

-1 = raw
display the modules with nothing added and will not display titles.

Module 1 OutputModule 2 OutputModule 3 Output

-2 = XHTML
display the modules inside div tags and header tags.

<div class="moduletable[suffix]“>
<h3>Module Title</h3>
Module output
</div>

-3 = extra divs
place extra div tags around the modules to allow for things like stretchable rounded corners.

<div class="module[suffix]“>
<div>
<div>
<div>
<h3>Module Title</h3>
Module output
</div>
</div>
</div>
</div>

Display a screen showing the positions for your current template

Just add the “?tp=1″ in url to show the positions.

Test the template

Just add the “?template=xxx” in url to show the specific template.

Leave a Reply

You must be logged in to post a comment.

Wordpress template made by HeJian