magento - Get Ext/Module Name of Form Element -


in admin configuration have section has groups , fields. 1 of fields i'm doing custom stuff via <frontend_model> in _getelementhtml()

is there way retrieve module or extension name of current extension within function?

<sections>     <extensionname translate="label" module="extensionname">         <label>extension name</label> 

sorry if question isn't clear... know i'm trying stumbling in how ask.

i'm not sure if helps me make question more clear here solution came with...

protected function _getelementhtml(varien_data_form_element_abstract $element){     $modules = mage::getconfig()->getnode('modules')->children();     $modulesarray = (array)$modules;      $module = '';     foreach($modulesarray $k => $v){         if(strpos(strtolower($k), $this->getrequest()->getparam('section')) !== false){             $module = $k;         };     } 

essentially wanting extensions or "modules" name later on in code call this

mage::getconfig()->getnode()->modules->$module->version

that way wouldn't have hard code in extension or modules name dynamic...

if.... there better way of doing please let me know hacking way through lol.


Comments