Re: [SMARTY] different elements for different sections of site
| From: | Nick Wilson | Date: | Wed, 24 Jul 2002 11:47:22 +0000 |
| Subject: | Re: [SMARTY] different elements for different sections of site | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-5407@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
* and then Simon Willison declared....
> >I have a site that I want to have different left hand menus for each
> >section and occasionally different righthand secitons also.
> >
> >In phplib i would have created template files for the different lefthand
> >menus and just parsed them into the main template.
> >
> >What's the recommended Smarty way of doing this?
>
> I don't know that this is the "recommended" way of doing it, but I would
> have a seperate template for each of the different menus and include
> them in to the template using this:
>
> {include file=$menuTemplate}
>
> Then use assign to tell Smarty which template to use:
>
> $smarty->assign('menuTemplate', 'leftHandMenu1');
Nice. Thanks Simon, I thought maybe config files would be involved but
that looks pretty damn simple to me ;-)
- --
Nick Wilson // www.explodingnet.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
iD8DBQE9PpPJHpvrrTa6L5oRAi5UAKCjmOzUkSOYpWhJIRY0OKqGu+pUGQCgpxJl
F09TqxeygKohTwQrXqyB00o=
=hVWh
-----END PGP SIGNATURE-----