Re: Separated templates for each module

From: Date: Wed, 12 Feb 2003 12:51:44 +0000
Subject: Re: Separated templates for each module
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-7673@lists.php.net to get a copy of this message
Hi I guess you\'ve a index.php in each module? mod.users/index.php and so on. if you are in the mod.users module you can define a variable a.e.: $myConf[\'module\'] = \'mod.users\'; you\'ve to do this in each php-file in the modules. after the defined variable you load smarty: $smarty->template_dir = $yourRootPath.\'/\'.$myConf[\'module\'].\'/_templates\'; not tested, but it should work. perhaps you can define $smarty->template_dir = \'/_templates\'; without your root-path and module-path, try it. -----Ursprüngliche Nachricht----- Von: Konference <konference@menea.cz> Gesendet: Wed 12.02.2003 00:00 An: smarty-general@lists.php.net Betreff: [SMARTY] Separated templates for each module > Hi all! > > I use SMARTY and I make a module-based administration system, e.g. > > ./admin/mod.users > ./admin/mod.backup > > a so on. I need to make separated SMARTy templates for each module. My idea > is in each module make sub-directory, e.g. named \"_templates\" and templates > place there. Bud I have no idea how to SMARTY say, that musts to use > templates from actual \"mod.name/_templates\" directory. > > Have somebody some idea?? > > jiri.nemec at menea.cz > http://www.menea.cz > ICQ: 114651500 > > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

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