Function Reference

File and Function Reference

The following functions are available to template developers.

mosLoadComponent

Syntax:

mosLoadComponent( $name )

Loads a component. For example "banners".  Do not include the "com_" prefix.

mosCountModules

Syntax:

mosCountModules( $position_name )

Counts the number of modules that may be shown on the current page in the "position_name" position.

mosLoadModules

Syntax:

mosLoadModules( $position_name [, $style] )

Displays all modules that are assigned to the "position_name" position for the current page. The "style" argument is optional but may be:

  • 0 = (default display) Modules are displayed in a column. The following shows an example of the output:

    <!-- 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 -->
    
     
  • 1 = Modules are displayed horizontally. Each module is output in the cell of a wrapper table. The following shows an example of the output:

    <!-- 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>
     
  • -1 = Modules are displayed as raw output and without titles. The following shows an example of the output

    Module 1 OutputModule 2 OutputModule 3 Output
     
  • -2 = Modules are displayed in X-Joomla format. The following shows an example of the output:

    <!-- Individual module -->
    <div class="moduletable[suffix]">
      <h3>Module Title</h3>
      Module output
    </div>
    <!-- Individual module end -->
     
  • -3 = Modules are displayed in a format that 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 -->

Note in all cases that an optional class "suffix" can be applied via the module parameters.

mosShowHead

Syntax:

<?php mosShowHead(); ?>

Assembles various head tags including the title tag and several meta tags.

mosMainBody

Syntax:

<?php mosMainBody(); ?>

Includes the output of the component as determined by the value of option in the URL.

Last Updated ( Friday, 12 May 2006 )