Hi,

At the moment parameters ar kept in arrays like:
*confstrs*[sStockWarningLimit].
General simple access might
be not the best idea.

Maybe there can be a whitelist of customer added field arrays like
"custstrs[...]" or similar with this kind of simple
access via template. Or You can move most important settings to getters,
other settings would be accessible in this
simple way.

G.

On Mon, Feb 28, 2011 at 10:10 AM, Alfonsas Cirtautas <
[email protected]> wrote:

>  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]
>
>
> --
> *******************************************
> 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/[email protected]http://www.shoptimax.de
> *******************************************
>
>
> _______________________________________________
> dev-general mailing list
> [email protected]
> http://dir.gmane.org/gmane.comp.php.oxid.general
>
_______________________________________________
dev-general mailing list
[email protected]
http://dir.gmane.org/gmane.comp.php.oxid.general

Reply via email to