[TYPO3-german] Verschachteltes Template

Mario Adam mail at i-dentify.de
Sun Apr 9 22:29:15 CEST 2006


Hallo Liste,

ich mache grad meine ersten Gehversuche in der Entwicklung von 
Extensions und bin schon auf fremde Hilfe angewiesen :-)
Irgendwie will der Knoten im Hirn nicht platzen.

Ich habe im PHP-Code ein Array nach folgendem Muster:

array (
  [0] = array (
         channel_name = 'whatever'
         persons = array (
                     name = 'me :) '
                   )
         subchannesl = array (
                         channel_name = 'something_other'
                         persons = array (
                                     name = 'you :)'
                                   )
                       )
        )
   [1]...
   ...
)

Das ganze will ich gern in folgendes Template quetschen:

   <!-- ###TEMPLATE_TSVIEWER### begin -->
     <table class="content_right" cellspacing="0" cellpadding="0">
       <tbody>
         <tr>
           <td class="item">
           <!-- ###TSVIEWER_CHANNELS### begin -->
             <ul class="teamspeak">
             <!-- ###TSVIEWER_CHANNEL### begin -->
               <li class="channel">###CHANNEL_NAME###</li>
               <!-- ###TSVIEWER_PLAYERS### -->
               <ul class="players">
               <!-- ###TSVIEWER_PLAYER### -->
                 <li class="player">###PLAYER_NAME###</li>
                 <!-- ###TSVIEWER_PLAYER### -->
               </ul>
               <!-- ###TSVIEWER_PLAYERS### -->
               <!-- ###TSVIEWER_SUBCHANNELS### -->
               <ul class="subchannel">
               <!-- ###TSVIEWER_SUBCHANNEL### -->
                 <li class="channel">###CHANNEL_NAME###</li>
               <!-- ###TSVIEWER_SUBCHANNEL### -->
               <!-- ###TSVIEWER_SUBPLAYERS### -->
                 <ul class="players">
                 <!-- ###TSVIEWER_SUBPLAYER### -->
                   <li class="player">###PLAYER_NAME###</li>
                 <!-- ###TSVIEWER_SUBPLAYER### -->
                 </ul>
               <!-- ###TSVIEWER_SUBPLAYERS### -->
               </ul>
               <!-- ###TSVIEWER_SUBCHANNELS### -->
             <!-- ###TSVIEWER_CHANNEL### end -->
             </ul>
           <!-- ###TSVIEWER_CHANNELS### begin -->
           </td>
         </tr>
       </tbody>
     </table>
   <!-- ###TEMPLATE_TSVIEWER### end -->

Na ja - das Ergebnis, was ich erhalte, sieht alles andere als gut aus. 
Ich find auch nirgends einen Anhaltspunkt, wie ich diese verschachtelte 
Struktur lösen kann.
Hat jemand einen Vorschlag?

Beste Grüße
Mario Adam



More information about the TYPO3-german mailing list