|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
doc_12 Smarty Rookie
Joined: 04 Jan 2005 Posts: 13
|
Posted: Thu Feb 10, 2005 5:16 pm Post subject: Recursion XML |
|
|
Hallo Smarty Gemeinde
Ich habe diesmal ein verständniss Problem wer kann mir hierbei weider helfen.
So habe ein XML Menü das dargestellt gehört mit Sub/Sub und noch mehr Subs
wie stelle ich es an das das ich aus den Übergebene Parameter site recursive das entsprechende Menü ausgebe.
Momentan kann ich zwar fest abfragen wollte das unendlich tief generieren lasssen können, zb.
Code: | {foreach from=$xmlMenue->menue item=item }
{if $item->id == $site[0] }
<br /><a href="{$item->target|utf8_decode}?site[0]={$item->id}" ><b>{$item->name|utf8_decode}</b></a>
{foreach from=$item->menue item=sub }
{if $sub->id == $site[1] }
<br />& - <a href="{$sub->target|utf8_decode}?site[0]={$item->id}&site[1]={$sub->id|utf8_decode}"><b>{$sub->name|utf8_decode}</a></b>
{else}
<br />& - <a href="{$sub->target|utf8_decode}?site[0]={$item->id}&site[1]={$sub->id|utf8_decode}">{$sub->name|utf8_decode}</a>
{/if}
{/foreach}
{else}
<br /><a href="{$item->target|utf8_decode}?site[0]={$item->id}">{$item->name|utf8_decode}</a>
{/if}
{/foreach} |
VIELEN DANK!
PS: Ich weis das es hierzu schonein paar post gibt, aber leider engl und ich check es nicht |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|