I can write my own UDT to find out if a module is installed.
But, is there an already existing way?
I've scoured the forums and docs and haven't found notice of any. I just thought I would check here...
Simple Way to Find If Module Exists? [solved]
Simple Way to Find If Module Exists? [solved]
Last edited by kendo451 on Wed Apr 20, 2011 8:25 pm, edited 1 time in total.
Re: Simple Way to Find If Module Exists?
Code: Select all
$gCms = cmsms(); //global $gCms;
if( !isset( $gCms->modules['TheModuleIWant'] ) || !isset( $gCms->modules['TheModuleIWant']['object'] ) )
{
return;
}
$themoduleiwant = $gCms->modules['TheModuleIWant']['object'];
$themoduleiwant->DoThis($somedata);
$themoduleiwant->DoThat($somemoredata);
Re: Simple Way to Find If Module Exists?
or use CGSimpleSmarty....
Ronny
Code: Select all
{if $cgsimple->module_installed('FrontEndUsers')}Found FEU{/if}
Re: Simple Way to Find If Module Exists?
Thanks both of you! Ronny, your method is what I was looking for.