For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > July 2004 > Re: [SMARTY] setting up and loading a config file problematic here









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [SMARTY] setting up and loading a config file problematic here
Monte Ohrt

2004-07-20, 8:59 pm

{$smarty.config.navilinks} should be in the .tpl file after the
{config_load ...} call, is that what you're doing?

Thorsten wrote:

> hi,
>
> i've re-discovered Smarty a few days back and tried setting up a
> config file with variables and loading it in a .tpl file.
>
> i read up on it in the 2.6.0 documentation (p. 13) and think i entered
> stuff correctly:
>
> in the .conf:
> navilinks = "<a href='#'>f00</a> - <a href='#'>bar</a>"
>
> in the .tpl:
> {config_load file="variables.conf"}
>
> in the .php:
> {$smarty.config.navilinks}
>
> the {$smarty.config.navilinks} returns nothing in the .php file when
> invoking the respective page while the other code like including .tpls
> et al works.
>
> any idea? more info needed?
>
> cheers,
>
> - Thorsten
>

Thorsten

2004-07-20, 8:59 pm

hi Monte,

> {$smarty.config.navilinks} should be in the .tpl file after the

{config_load ...} call, is that what you're doing?

no, i wasn't, don't know where i got the .php idea from! put it into the
..tpl and it works of course. thx.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com