RE: [SMARTY] switch substitute
| From: | Josh Johnson | Date: | Mon, 07 Oct 2002 11:58:23 +0000 |
| Subject: | RE: [SMARTY] switch substitute | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-6101@lists.php.net to get a copy of this message | ||
In your code,
{include file=$smarty.get.footer}
should be
{include file=$footer}
That should give you exactly what you want...
The manual I've used since I started working with smarty:
http://smarty.php.net/manual/en/
It isn't really the kind of manual you can just skim through looking for
specific solutions to specific problems, you really have to read it (I
skimmed past the {section} chapter, developed an entire site without
ever using it, because {foreach} looked more familiar, and I had to jump
through a lot of hoops to get the basic functionality of {section}
within {foreach}!).
Happy coding :)
-- Josh
-----Original Message-----
From: Simone [mailto:just4smarty@email.it]
Sent: Monday, October 07, 2002 4:37 AM
To: smarty-general@lists.php.net
Subject: Re: [SMARTY] switch substitute
I have a foo.php file
foo.php ----
<?php
...
$smarty->assign('footer',"footer_a.tpl");
$smarty->display('base.tpl');
...
?>
Than I have my base.tpl where I want dispaly the right footer
but your solution doesn't seems to work ...
<html>
<body>
...
{include file=$smarty.get.footer}
...
</body>
</html>
Probaly I have done something wrong ... :-(
Anyway I have read the manual ... but the one that I had was quite small
and
almost without examples ... :-( Can you suggest me a good manual ?
Simone
On Sunday 06 October 2002 14:59, Josh Johnson wrote:
> I should say RTFM, but when you specify a smarty variable, even the
> special $smarty.get variable, inside of another template function
(like
> include), you just drop the delimiters ({}), so it would be:
> {include file=$smarty.get.var}
>
> You really should read through the docs before you ask questions, this
> is stressed over and over there. :)
> -- Josh
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php