Start
  News
  Suche
    Breadcrumb
    globalVar
    ifEmpty
    Link to Top
    max filesize
 

globalVar

Globale Variable

Sehr geschickte Einrichtung.

zB bei den News die Ausgabe des Datums abhängig von der Sprache:

CONSTANTS

display.date.stdWrap=%d.%m.%y

[globalVar = GP:L = 1]

display.date.stdWrap=%y-%m-%d

[globalVar = GP:L = 2]

display.date.stdWrap=%d.%m.%y

[global] 

SETUP

plugin.tt_news{

  templateFile = {$path_templates}/news.tmpl

  displayList.date_stdWrap.strftime= {$display.date.stdWrap}

  displaySingle.date_stdWrap.strftime= {$display.date.stdWrap}

  displayLatest.date_stdWrap.strftime= {$display.date.stdWrap}

  allowCaching = 1

  searchPid = 20

}

Oder für eine Seitenauswahleiner Subnavi (special=list) abhängig von der id der Seite:

CONSTANTS

pid.list = 7,12,13,14,28

[globalVar = TSFE:id = 6]

pid.list = 52,12,13,14,28

[global]

SETUP

  20 = HMENU

  20 {

    special = list

    special.value = {$pid.list}

    1 = TMENU

    1 {

      expAll = 0

      noBlur = 1

      NO {

        allWrap = <b> | </b>

 

        ATagTitle.field = abstract // description // title

        }

 

      ACT = 1

      ACT {

        allWrap =<b><i> | </i></b>

 

        ATagTitle.field = abstract // description // title

        }

      ACTIFSUB = 1

      ACTIFSUB {

        allWrap =<b><i><em> | </em></i></b>

 

        ATagTitle.field = abstract // description // title

        }

      }