|
|
Home Manual 11. API Reference mosLoadModules |
| mosLoadModules |
|
|
|
|
Last reviewed: 2 Dec 2005, Joomla 1.0.4 mosLoadModulesLoads the modules in the specified position. This function loads the module(s) for the position that is specified in the position parameter. If the style parameter is 1 (indicating horizontal module layout) and there is at least one module, then the modules are inserted into a table that has one row. If the GET variable 'tp' is set to 1, then the function returns after outputting the value of the position variable enclosed in <div> tags. The GET variable 'tp' is used by the adminstration backend to provide a preview of the site with the positions identified. This function is most apt to be called from a template. For more information on functions that are helpful for template developers, see the Templating Function Reference. This function does not return a value. Note in all cases that an optional class "suffix" can be applied via the module parameters. Syntaxvoid mosLoadModules ( [ string $position [, int $style ]] )
Defined inincludes/template.php ExamplesExample: Loading the modules in the 'left' position using the default style. mosLoadModules( 'left' ); Example: Loading the modules in the 'right' position and displaying them horizontally. mosLoadModules( 'right', 1 ); Example: Output of modules that are displayed in a column <!-- 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 -->
Example: Output of modules that are displayed horizontally. Each module is output in the cell of a wrapper table. <!-- Module wrapper -->
<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>
Example: Output of modules that are displayed as raw output. Titles are not displayed. Module 1 OutputModule 2 OutputModule 3 Output Example: Output of modules displayed in XHTML format. <!-- Individual module --> <div class="moduletable[suffix]"> <h3>Module Title</h3> Module output </div> <!-- Individual module end --> Example: Output of modules that are displayed with extra divs. This format allows, for example, stretchable rounded corners. This option was introduced in Mambo 4.5.2.1. <!-- Individual module -->
<div class="module[suffix]">
<div>
<div>
<div>
<h3>Module Title</h3>
Module output
</div>
</div>
</div>
</div>
<!-- Individual module end -->
Please report any errors on this page to the Developer Documentation Forum. |
|
| Last Updated ( Tuesday, 03 January 2006 ) |
| < Prev | Next > |
|---|





