JModuleHelper/getLayoutPath
From Joomla! Documentation
This method returns the path to the layout file for the module. It checks if there is a layout 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 override file; otherwise it returns the path to the original layout file. Note that, unlike other JModuleHelper methods, you must include the 'mod_' prefix here. If the module does not exist the path to the layout file will still be returned.
Syntax
string getLayoutPath( $module, $layout )
where:
| Argument | Data type | Description | Default |
|---|---|---|---|
| $module | string | The name/type of the module. You must include the 'mod_' prefix here. | |
| $layout | string | The name of the layout. | 'default' |
Example
Determine the path to the layout of the mod_feed module.
jimport( 'joomla.application.module.helper' ); echo JModuleHelper::getLayoutPath( 'mod_feed' );
If the layout has not been overridden this might output:
/htdocs/modules/mod_feed/tmpl/default.php