Re: Variable template directories.
| From: | Monte Ohrt | Date: | Thu, 07 Mar 2002 01:09:56 +0000 |
| Subject: | Re: Variable template directories. | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-2958@lists.php.net to get a copy of this message | ||
That could work, or couple other ways to do it:
1) put themes in subdirectories, and use a variable to switch between them:
{include file="$theme/index.tpl"}
2) Write a resource function that does whatever you want: gets templates from
different directories, etc.
{include file="theme:funky:index.tpl"}
IpSo wrote:
> I would like to offer a "themeable" website, and I figured Smarty would be
> perfect for such a thing. I could make the templates for each theme, put them in
> there own directory, ie:
>
> SMARTY_DIR/templates_theme1
> SMARTY_DIR/templates_theme2
> SMARTY_DIR/templates_theme3
>
> Then have a variable that sets the template directory on the fly, so the user
> can switch between them on the fly. Would this be a recommended way of doing it?
>
> IpSo
>
> --------------------------------------------------------------------
> Never worry about viruses in your Email again.
> Get your FREE! virus scanned Email accounts at
> http://snappymail.ca
>
> ---
> You are currently subscribed to smarty as: monte@ispi.net
> To unsubscribe send a blank email to $subst('Email.Unsub')
> Visit Smarty's homepage at
> http://www.phpinsider.com/php/code/Smarty/