Re: Design question
| From: | Andrei Zmievski | Date: | Fri, 13 Jul 2001 13:16:44 +0000 |
| Subject: | Re: Design question | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-1157@lists.php.net to get a copy of this message | ||
On Fri, 13 Jul 2001, Luc Saint-Elie wrote:
> The question is :
>
> In PHP (and perhaps in other languages) for a huge number of options, switch is
> quicker than if
> So the logical choice would be to use way #2
> But in this case the switch must be added in all .php files making the site
> maintenance a real assle
> (each time a new template to be included is added, all .php files must be
> updated)
> On the other hand using way #1 allow to only one file (the index.tpl) to
> maintain... but is slower.
>
> What is the right approach ?
If your screen names don't have spaces in them, why not do:
{include file= "clientname.$screen.tpl"}
This should save you time and trouble. ;-)
-Andrei
* E Pluribus UNIX. *