[TYPO3-german] Bitte um Erklärung zu Thema "if"

Marco Brüggemann marco at schauart.de
Sun Jan 27 12:45:55 CET 2013


Hallo,

vielen Dank für die Antwort, .. bis jetzt habe ich es noch nicht 
verstanden und es funktioniert auch nicht, daher will ich das ganze 
Sktipt zeigen (gekürzt)

*# das fertige Objekt /tmp.content_FIN/ welches entstehen soll, soll die 
gesamte sichtbare HTML-Seite beinhalten*
*# 
---------------------------------------------------------------------------------------------------------*
/tmp.content_FIN = CASE
tmp.content_FIN {
/*# je nach dem welches Seitenlayout eingestellt ist, wird 1, 2, ... 
default genutzt (FUNKTIONIERT)*
*# 
---------------------------------------------------------------------------------------------------------*
/  key.field = layout

   1 = COA
   1 {

///*# Hier soll der Header ausgegeben werden, aber nur wenn in 
"Seiteneigenschaften subtitle" etwas eingetragen ist, da daraus das 
Hintergrundbild des headers erstellt wird*
*# 
---------------------------------------------------------------------------------*/**/*(FUNKTIONIERT 
NICHT)*/
     10 = COA
     10 {
       stdWrap.if.isTrue.field = subtitle
       10 = TEMPLATE
       10{
         template = <style type="text/css">div#header {background: 
url("fileadmin/template_001/img/###CSSMARKER###_02.png") no-repeat; 
height:300px; background-position: center center;} @media only screen 
and (min-width: 1500px) { div#header {background: 
url("fileadmin/template_001/img/###CSSMARKER###_01.png") no-repeat; 
height:400px; background-position: center center;} } @media only screen 
and (max-width: 1024px), only screen and (device-width: 1024px) and 
(orientation: landscape) { div#header {background: 
url("fileadmin/template_001/img/###CSSMARKER###_03.png") no-repeat; 
height:250px; background-position: center center;} } </style>
         marks {
           CSSMARKER = TEXT
           CSSMARKER.field = subtitle
         }
       }
     }
/*# 
---------------------------------------------------------------------------------*/**/*(FUNKTIONIERT 
NICHT)*/
/
/    20 = COA
     20 {
       10 = CONTENT
       10 {
         table = tt_content
         select {
           pidInList = this
           orderBy = sorting
           where = colPos = 0
           languageFild = sys_language_uid
         }
       }
       stdWrap.wrap = <div class="block01 box">|</div>
       stdWrap.required = 1
     }

     30 = COA
     30 {
       10 = CONTENT
       10 {
         table = tt_content
         select {
           pidInList = this
           orderBy = sorting
           where = colPos = 1
           languageFild = sys_language_uid
         }
       }
       stdWrap.wrap = <div class="block02 box">|</div>
       stdWrap.required = 1
     }
   } /*# Ende der Seitendefinition für Layout 1*
/
   2 = COA
   2 {
     10 < styles.content.get
     10.wrap = <div class="Layout2">|</div>
   }

   3 = COA
   3 {
     10 < styles.content.get
     10.wrap = <div class="Layout3">|</div>
   }

   default = COA
   default {
     10 < styles.content.get
     10.wrap = <div class="default">|</div>
   }
}/



Am 27.01.2013 12:15, schrieb Ralf-Rene Schröder:
> so kann es nicht gehen
> TEMPLATE hat kein "if"
> und es würde sich ja auch nur auf das 10er Objekt des COA beziehen
> (und er hat bestimmt mehr darin als nur das TEMPLATE...)
>
> Am 27.01.2013 10:03, schrieb SW:
>> versuchs mal so:
>>
>> 20 = COA
>> 20 {
>>    10.if.isTrue.field = subtitle
>>    10 = TEMPLATE
>>    10 {
>>      }
>>    }
>> }
> folgendes muss eigentlich klappen
> (natürlich nur wenn an dieser Stelle im TS das field subtitle überhaupt
> zur Verfügung steht ... also innerhalb eines CONTENT Elements o.ä. ...
> so habe ich es hundertfach im TypoScript drin stehen)
>
> 20 = COA
> 20 {
>    stdWrap.if.isTrue.field = subtitle
>    10 = TEMPLATE
>    10 {
>      template = Inhalt mit ###MARKER###
>      marks {
>        CSSMARKER = MARKER
>        CSSMARKER.field = subtitle
>      }
>    }
> }
>


-- 

*Marco Brüggemann - schauart designservice*

Radewiesenweg 9
12355 Berlin

fon & fax: 030 66 46 30 80
email: marco at schauart.de
web: www.schauart.de



More information about the TYPO3-german mailing list