[Fwd: Re: [SMARTY] Set config file from php?]

From: Date: Thu, 09 May 2002 13:48:01 +0000
Subject: [Fwd: Re: [SMARTY] Set config file from php?]
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-4118@lists.php.net to get a copy of this message
I found a neat method that works for me. I have a templated named header.tpl that is included from all my "master" templates. In that file I have this: <{config_load file="web.conf" scope="global"}> <{config_load file="global.conf" section=#colorscheme# scope="global"}> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> .etc. I have a global config file with sections for each color scheme like this: [1] color = #003399 background_color = #ccccff [2] color = #000099 background_color = #9999ff Then my web.conf file has this: colorscheme = 1 And I get the colorscheme I want into my output files. Ivan Voras wrote: > > On Thu, 9 May 2002, Monte Ohrt wrote: > > > {config_load file="$template/display.conf"} > > > > (in config_dir) > > > > /mytheme1/display.conf > > /mytheme2/display.conf > > ... > > > > well, yes and no. I see now that it would be a very nice solution IF my > current themes system was organized that way from the start. > > My layout is like this: > > /img/themes/theme1/pic1.jpg > /img/themes/theme1/pic1.jpg > /img/themes/theme2/pic1.jpg > /...something.../theme1/...some other theme1 related stuff > ... > /config/theme1.cfg > /config/theme2.cfg > > (and for some reasons it must stay this way) > > -- > Ashes to ashes, DOS to DOS > ivoras @ fer.hr > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.smarty.general (#4118) next »