RE: [SMARTY] Refactoring templates folder

From: Date: Fri, 27 Oct 2006 17:28:38 +0000
Subject: RE: [SMARTY] Refactoring templates folder
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-13539@lists.php.net to get a copy of this message
Terrific-- since the templates use a lot of shared files, but there is usually only one master page (which I want to break out into its own folder). So this works extremely well. Thanks. > -----Original Message----- > From: Owen Cole [mailto:owenc@totalsales.com] > Sent: Friday, October 27, 2006 9:28 AM > To: smarty-general@lists.php.net > Subject: Re: [SMARTY] Refactoring templates folder > > My solution is probably a PITA, but you could include your templates > using a relative path from your template_dir > > ie {include file="subdir/templateinsubdir.tpl"} > > $smarty->display('subdir/templateinsubdir.tpl'); > > Eric Mueller wrote: > > Hi, I have so many files in my templates/ folder that I'm > trying to break it > > down into sub-folders. > > > > I can set the templates directory by changing the > $smarty->template_dir > > variable, but the problem is my templates all {include} common files > > (header.tpl, footer.tpl, that sort of thing). > > > > Sooo... is there a way to set the template_dir in the > template itself, so I > > can be sure the common files are loaded from > templates/shared, but then the > > main template comes in from a different sub-folder under > templates/ ? > > > > thanks, > > Eric > > > > _____ > > Eric Mueller - (323) 852-0883 (Pacific time), (323) 417-4900 fax > > Themepark - a specialized web services company > > "great web sites, delicious corn dogs!" > > http://themepark.com > > > > A Cappella Always, the 24x7 all-a cappella radio station! > > broadcasting since 2001 at http://acappellaalways.com > > > > > > > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

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