... Elxis version 2009.3 codename Aphrodite is out, download it from Elxis Download Center (EDC) ...

Load module by name

From Elxis Official Documentation

Jump to: navigation, search

Elxis 2008.0 or greater allows you to load any module, anywhere, regardless its position! To do so you must use the elxLoadModule function. Basic syntax:

elxLoadModule($module_name, $style);

The $module_name parameter is the module's name (or type) as shown in the "type" column in the Modules Manager page. The $style is the style of the module.


Sample usage

//Load module Language without title and in raw format:
elxLoadModule('mod_language', -1);
 
//Load module AccuWeather enclosed by DIV:
elxLoadModule('mod_accuweather', -2);
 
//Load module Who Is Online with rounded corners:
elxLoadModule('mod_whosonline', -3);


Modules loaded with the elxLoadModule function might also be loaded by the mosLoadModules function if you have set these modules in a visible position in your template (like left or right). To prevent such thing from happening set these modules in a module position that is not visible in your site front-end, like the hidden module position.
Personal tools