Hi,
suggested module will work, but we are thinking about solution limiting to only config specific option access from templates. Regards, Alfonsas ________________________________ From: [email protected] [[email protected]] on behalf of Stefan Moises [[email protected]] Sent: Thursday, February 17, 2011 3:34 PM To: [email protected] Subject: Re: [oxid-dev-general] [oxid-dev-general] Shop config access from template Hi, good point, I was wondering that myself... such a function would be really helpful, and since oxViewConfig can be extended by a module, you can easily make an oxViewConf module and add this function, so you can use [{ $oViewConf->getConfigParam('someValue') }] in your templates: class myOxViewConfig extends myOxViewConfig_parent { public function getConfigParam( $sParamName ) { return $this->getConfig()->getConfigParam( $sParamName ); } } And in Admin add this to the "Modules" section: oxviewconfig => myoxviewconfig Cheers, Stefan Am 17.02.2011 14:15, schrieb GiedriusK: Hi, How to access shop config parameters from Smarty template? I noticed many functions in oxviewconfig.php like: /** * Returns facebook application key value * * @return string */ public function getFbAppId() { return $this->getConfig()->getConfigParam( 'sFbAppId' ); } What is the reason not to have smth like this?: public function getConfigParam( $sParamName ) { return $this->getConfig()->getConfigParam( $sParamName ); } Thank You for advice. [email protected]<mailto:[email protected]> -- ******************************************* Stefan Moises Senior Softwareentwickler shoptimax GmbH Guntherstraße 45 a 90461 Nürnberg Amtsgericht Nürnberg HRB 21703 GF Friedrich Schreieck Tel.: 0911/25566-25 Fax: 0911/25566-29 [email protected]<mailto:[email protected]> http://www.shoptimax.de *******************************************
_______________________________________________ dev-general mailing list [email protected] http://dir.gmane.org/gmane.comp.php.oxid.general
