Re: [SMARTY] Dynamically using my configfile
| From: | Monte Ohrt | Date: | Tue, 09 Apr 2002 16:14:04 +0000 |
| Subject: | Re: [SMARTY] Dynamically using my configfile | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-3578@lists.php.net to get a copy of this message | ||
Currently you can't. Try reorganizing your config file so that the section is dynamic:
example.conf
------------
[foo]
name = blah
name2 = blah2
[bar]
name = blah3
name2 = blah4
index.tpl
---------
{config_load file="example.conf" section=$section_name}
{#name#}
Thomas Akkermans wrote:
Hi, I want to get some text from my config-file dynamically This is what I'm trying, but it won't work: [php] .. $text =3D "name"; $smarty->assign("message", $name); .. [/php] [configfile] name =3D "teststring" name2 =3D "teststring2" [/configfile] [template] .. {#$message#} .. [/template] Does someone now how to solve this problem? -- Thomas-- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc.