Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Recursion XML

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: German
View previous topic :: View next topic  
Author Message
doc_12
Smarty Rookie


Joined: 04 Jan 2005
Posts: 13

PostPosted: Thu Feb 10, 2005 5:16 pm    Post subject: Recursion XML Reply with quote

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 Very Happy

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
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: German All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP