Smart Navigation Using Smarty ?
| From: | Jim Harlindong | Date: | Thu, 01 Mar 2001 16:56:14 +0000 |
| Subject: | Smart Navigation Using Smarty ? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-254@lists.php.net to get a copy of this message | ||
Sorry my mistake it was <%/if%>
I think I'll stick to <% %> as DW cooperates well with ASP tags.
Another question or suggestion.
I have a common navigation buttons at the top or on the left side, let's say
3 buttons:
Home
Search
Contact
these are inside a file called nav.tpl
Say those are image buttons, or it could also be a text link.
So if I am include nav.tpl in all the three other templates (home, search
and contact) the resulting page will have a link even to its own. e.g. on
the Home page people can click on Home.
I hope you can understand what I am trying to say :)
Is there a way so that Smarty will conditionally include certain code / part
depending on current page, ideally have an easy way to say
{current page="index.php"}
<b>home</b>
{current_else}
<a href="index.php">Home</a>
{/curent}
Regards,
Jimmy