Actions

JModuleHelper/getLayoutPath

From Joomla! Documentation

Revision as of 11:58, 8 November 2008 by Batch1211 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Copyedit.png
This Article Needs Your Help

This article is tagged because it NEEDS REVIEW. You can help the Joomla! Documentation Wiki by contributing to it.
More pages that need help similar to this one are here. NOTE-If you feel the need is satistified, please remove this notice.


Contents

Syntax

string getLayoutPath ($module, [$layout = 'default'])

where:

Argument Data type Description Default
$module string The name of the module
$layout string The name of the layout to be loaded default

What does this method do?

This method returns the path to the layout file of the module. It checks if there has been a template override in the 'html' folder of the template (See: How to override the output from the Joomla! core). If there is, it returns the path to the template override file, else it returns the path to the original layout file.

Example

Let's try to get the the layout path of the mod_feed Module of Joomla.

jimport('joomla.application.module.helper');
echo JModuleHelper::getLayoutPath('mod_feed');
/* RESULT:
/htdocs/modules/mod_feed/tmpl/default.php
*/

See also