Expanding Module/Component Parameter Functionality

Locked
ddorothy
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sat Jul 15, 2006 4:25 am

Expanding Module/Component Parameter Functionality

Post by ddorothy » Mon Sep 04, 2006 7:03 pm

I modified some of the core files today to meet a specific need and thought that it might be a good idea for something to add into the core.  Let me know if someone would like to see the code. 

Basically the way it works is that you provide a file named mod_mymodule.class.php, then the admin.modules.php file in the administrator/components/com_components folder includes the file and passes the name of the module type (mod_mymodule) into the mosParameters class (added a $_name variable).  Then the mosParameter->render() function checks the type for a built in function first, then a function in the mod_mymodule class.  If the function in mod_mymodule exists then it executes the function just as it would a built in. 

This allows dropdowns of any kind from data from the database when making custom modules or components (though I did not make code for components).  My use was to make a select list of menu types (ie. mainmenu, usermenu, etc).

Thanks.

Locked

Return to “Wishlist Archives - Archived”