[Typo3-german] Contitions von colPos ?

JoH info at cybercraft.de
Tue Sep 6 11:16:36 CEST 2005


> temp.templateswitch = CASE
> temp.templateswitch {
>     blah
> }
>
>
> # Default PAGE object:
> page = PAGE
> page.typeNum = 0
> page.10<temp.templateswitch
>
> wobei immer nur das template 2 geladen wird egal ob in der Rechten
> Spalte was ist oder nicht, wo liegt der fehler?

Der Fehler liegt darin, daß es in der Tabelle "pages" keine Feld "colPos"
gibt.
"colPos" befindet sich in der Tabelle "tt_content" und kann daher nur
innerhalb des Setups von tt_content verwendet werden.
Davon bin ich selbstverständlich ausgegangen, weil man TEMPLATE auch für die
Ausgabe einzelner Content-Elemente verwenden kann.

Was Du brauchst ist dann doch eine if-Abfrage auf numRows.

temp.templateswitch = COA
temp.templateswitch {
    10 = COA
    10 {
        if.isTrue.numRows < styles.content.getRight
        10 = TEMPLATE
        10 {
            template = FILE
            template.file = fileadmin/templates/maintemplate.html
        }
    }
    20 = COA
    20 {
        if.isFalse.numRows < styles.content.getRight
        10 = TEMPLATE
        10 {
            template = FILE
            template.file = fileadmin/templates/maintemplate2.html
        }
    }
}

oder so ähnlich ...

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your knob sometimes!)
Dieter Nuhr, German comedian
openBC: http://www.openbc.com/go/invuid/Jo_Hasenau





More information about the TYPO3-german mailing list