Hello,
How is it possible to output a module setting within a template?
I wrote a small oxid module which has some custom settings. I would like to output those settings inside my custom module template.
I already tried this:
[{$oxConfig::getInstance()->getConfigParam('mymodule_settingsname')}]
Hi Alex,
maybe this one is a helpful tool for your purpose:
Laters!
Hi,
I already solved my problem.
Here is the solution:
You have to extend the responsible controller for the template, where you need your values.
Quick Example:
class extendedUser extends extendedUser_parent {
public function render()
{
// get config values and push them to tpl
$myconfig = oxRegistry::get("oxConfig");
$this->_aViewData['MODULENAME_regex'] = $myconfig->getConfigParam("MODULENAME_regex");
$this->_aViewData['MODULENAME_message'] = $myconfig->getConfigParam("MODULENAME_message");
// render tpl
parent::render();
return $this->_sThisTemplate;
}
}