Hallo,
ich lese nun schon seit 3 Wochen alle möglichen Tutorials, TSRef usw.
Aber ich habe immer noch nicht so ganz verstanden, wann man das Constants-Feld verwendet und wann das Setup-Feld...
Mit dem Setup-Feld arbeite ich eigentlich recht gut.
Nun habe ich jedoch des öfteren gesehen, das man fast gleiche Angaben auch im Constants-Feld eingibt.
Wann wird was von den beiden für was verwendet?
Ich danke euch im Voraus für eure Hilfe...
Grüße
KASI
"Constants": The "Constants-field". This is where you put constants that is substituted in the setup-field. Eg. a constant "styles.content.textStyle.size" is inserted in the setup-field as "{$styles.content.textStyle.size}". Constants are substituted in the order they are introduced in this field. It is important to understand that constants are not used as programming variables. They only substitute constants items in Setup. Note that the Constants-field is "summed-up" (concatenated) with previous templates in the rootline and constants-fields from included templates.
"Setup": This field contains the TypoScript setup-code. Use constants from the "Constants-field" (3) to insert easily changable properties or global values. Note that the Setup-field is "summed-up" (concatenated) with previous templates in the rootline and Setup-fields from included templates.
Wenn du z.b. in dein ConstantFeld bgCol = red eingibst kannst du im SetupFeld darauf zurückgreifen
page = PAGE
page.typeNum = 0
page.bodyTag = <BODY bgColor="{$bgCol}">