|
|
Home Developer Manual 11. API Reference mosCountModules |
| mosCountModules |
|
|
|
|
Last reviewed: 18 Nov 2005, Joomla 1.0.3 mosCountModulesCounts the number of module(s) in the specified position. This function determines the number of modules in a given position. It is used primarily in the front end by the templates for the purpose of layout and styling. Returns an integer equal to the number of modules in the specified position. The position parameters defaults to 'left'. This function will return 1 if the GET variable tp is true. The tp variable is used by the Site Preview function in the adminstration backend. If the site is being previewed with positions, then tp is set to 1. Otherwise, tp is set to 0. Syntaxint mosCountModules ( [ string $position ] )
Defined inincludes/template.php ExamplesExample: Counting the modules in the left position. function displayLeftModulesCount() { $leftModuleCount = mosCountModules( 'left' ); echo "There are $leftModuleCount modules in the left position."; } displayLeftModulesCount(); might produce: There are 2 modules in the left position. Please report any errors on this page to the Developer Documentation Forum. |
|
| Last Updated ( Tuesday, 03 January 2006 ) |
| < Prev | Next > |
|---|





