Re: suggestion from monte
| From: | Monte Ohrt | Date: | Wed, 28 Mar 2001 14:38:31 +0000 |
| Subject: | Re: suggestion from monte | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-477@lists.php.net to get a copy of this message | ||
taliku@balcab.ch wrote:
>
> I didn't worked.
>
like I said, it was untested :-) It was just the idea I was trying to
get across, you'll have to design your own code.
> First i tried your example as it was. I get the menu points, but no titles,
> all links are ?$menu[$i] and no menu-names.
> Then i tried to use %mystuff.index% but it did not wok to. I get an
> template-syntax-error. i tried to replace ?$menu[$i]
> with ?{$menu/{%mystuff.index%}} and other things, but i always get an syntax
> error.
That syntax definately won't work. Nowhere in Smarty can you (or should
you) nest template tags. {%mystuff.index%} will give you the current
loop iteration in the section.
>
> This is how i "give" the template the $menu :
> $tpl->assign("menu",$menu);
>
> $Menu looks like this: $menu =
>
> array("home_/_news","projects","downloads","gaming","my_n-theme","site-info"
> );
>
> And i dont understand how to give the template a boolean information about
> the $QUERY_STRING.
Do your string comparison in the PHP code, then pass an array of
true/false values, one for each menu item so you can check this with IF
statements in Smarty.
--
Monte Ohrt <monte@ispi.net>
http://www.ispi.net/