[TYPO3-german] Copyright-Ausgabe mit if-Abfrage

Tobias Erlacher tobi at 54tec.com
Tue Sep 26 11:27:43 CEST 2006


Hallo Susanne,

> ich habe das Startjahr in den Constants:
> startdate = 2006
> und folgendes im Setup:
> temp.copyright = COA
> temp.copyright {
>   10 = TEXT
>   10 {
>    data = date : U
>    strftime = %Y
>    wrap = © {$startdate}-| Copyrightinhaber
>   }
> jetzt möchte ich den Zusatz Startjahr- gerne weglassen, wenn das  
> Startjahr dem aktuellen Jahr entspricht. Bisher habe ich sowas direkt  
> mit PHP realisiert und weiß leider nicht, wie ich diese if-Abfrage in  
> typoscript definieren kann.

Getestet und funktioniert so:

temp.copyright = COA
temp.copyright {
  10 = TEXT
  10 {
    if.value={$startdate}
    if.equals.data=date : U
    if.equals.strftime = %Y
    if.negate=1
    data = date : U
    strftime = %Y
    wrap = © {$startdate}-| 
  }
  20<.10
  20.if.negate=0
  20.wrap= &copy;&nbsp;|&nbsp;Copyrightinhaber
}

mit freundlichen grüßen

Tobias Erlacher
www.typo3wizard.com



More information about the TYPO3-german mailing list