xoops forums


Not too shy to talk
Posted on: 2004/10/17 9:29
reynaldo (Show more)
Not too shy to talk
Posts: 106
Since: 2004/2/13

Getting current module name


I don't know if this is the appropriated forum for this question: how can I get the current module name?
for example, let’s say I want to code a block which display current module name.
How can I get it to display it using XOOPS API and without having to resort to cheap tricks like extracting it from the current URL? Is this possible? I read XOOPS API documentation but couldn’t find anything related.

Thanks for your help.


Just can't stay away
Posted on: 2004/10/17 11:18
marcan (Show more)
Just can't stay away
Posts: 824
Since: 2003/10/8

Re:Getting current module name

Hi reynaldom try this code :
Global $xoopsModule;
$moduleName $xoopsModule->getVar('name');
$dirName $xoopsModule->getVar('dirname');

The $moduleName variable now holds the name of the module, ie the name defined in System Admin > Modules for the specific module where the user is currently in.

The $dirname variable holds the name of the folder of the module, ie in www.yoursite.com/modules/$moduleName

Hope it helps !

Cheers !