Zum Inhalt springen

3 verschiedene Templates abhängig vom Spalteninhalt ausgeben

Erstellt am 24. Juni 2008 · 2 Antworten · letzte Antwort am 27. Juni 2008

Tags: Templates & Layouts, Frage

minimalize ·

Hallo,

wie bereits im Betreff angegeben versuche ich mich derzeit an einer Lösung für 3 verschiedene Templates die je nach Spaltenbelegung aufgeerufen werdne. Allerdings funktioniert das ganze leider noch nicht so wie es soll. Im Moment wird nur die erste bedingung ausgegeben.

Hoffe mir kann hier wer helfen!

Hier mal mein TS

          if
          {
               
               isTrue.numRows < styles.content.getBorder {
                    10 = TEMPLATE
                    10 {
                         template = FILE
                         template.file = fileadmin/templates/2-3col/3col.html 
                         <INCLUDE_TYPOSCRIPT: source="FILE:fileadmin/tscript/template_marker.ts" >
                    }       
               }   

               isFalse.numRows < styles.content.getBorder {
                    if {
                         isTrue.numRows < styles.content.getLeft {
                              10 = TEMPLATE
                              10 {
                                   template = FILE
                                   template.file = fileadmin/templates/2-3col/1col.html
                                   <INCLUDE_TYPOSCRIPT: source="FILE:fileadmin/tscript/template_marker.ts" >
                              }
                         }        
                         isFalse.numRows < styles.content.getLeft {
                              10 = TEMPLATE
                              10 {
                                   template = FILE
                                   template.file = fileadmin/templates/2-3col/2col.html
                                   <INCLUDE_TYPOSCRIPT: source="FILE:fileadmin/tscript/template_marker.ts" >
                              }
                         }
                    }
               }
          
          }
minimalize ·

hat denn keiner eine idee dazu? Bin leider noch überhaupt noch nicht mit TS vertraut und hänge hier an dieser Stelle.

minimalize ·

So denn. Habs nun hinbekommen. Hatte die COA Elemente (keine Ahnung was das genau ist vergessen.)

So funktionierts auf jeden Fall!

     10 = COA
     10 {
          if.isTrue.numRows < styles.content.getBorder
          10 = TEMPLATE
          10 {
               template = FILE
               template.file = fileadmin/templates/2-3col/3col.html 
               <INCLUDE_TYPOSCRIPT: source="FILE:fileadmin/tscript/template_marker.ts" >
          }
          
     }  
     20 = COA
     20 {
          
          if.isFalse.numRows < styles.content.getBorder
          30 = COA
          30 {
               if.isTrue.numRows < styles.content.getLeft
               10 = TEMPLATE
               10 {
                    template=FILE
                    template.file = fileadmin/templates/2-3col/2col.html
                    <INCLUDE_TYPOSCRIPT: source="FILE:fileadmin/tscript/template_marker.ts" >
               }
          }
          40 = COA
          40 {
               if.isFalse.numRows < styles.content.getLeft
               10 = TEMPLATE
               10 {
                    template=FILE
                    template.file = fileadmin/templates/2-3col/1col.html
                    <INCLUDE_TYPOSCRIPT: source="FILE:fileadmin/tscript/template_marker.ts" >
               }
          }
          
     }