Zum Inhalt springen

Header-Bild abhängig von id wechseln

Erstellt am 12. Juli 2006 · 4 Antworten · letzte Antwort am 13. Juli 2006

Tags: Bilder, Frage

Uprooter ·

Hallo,
ich habe folgendes Problem:
Ich möchte auf meiner Seite das Header-Bildchen abhängig von der page-id anzeigen lassen und finde einfach keine Lösung dazu. Kann man das irgendwie mittels TS regeln oder mit einem PHP-Skript? Wäre super wenn das einer weiß.

Danke schon Mal im voraus🙂

Uprooter ·

hab einen ansatz gefunden aber der will nciht so recht:

[globalVar = TSFE:id = 11]

   
page.13.marks.topteil = HTML
   
page.13.marks.topteil.value = <div style="background-image:url(fileadmin/template/main/images/index.jpg);
		 background-repeat:no-repeat;
         	 height:130px;
                  width:830;
         	 margin-left:0px;
                  position:absolute;
                  top:10px;
                  left:7px;"></div>
[ELSE]
   
page.13.marks.topteil = HTML
   
page.13.marks.topteil.value = <div style="background-image:url(fileadmin/template/main/images/index_lehr.jpg);
		 background-repeat:no-repeat;
         	 height:130px;
                  width:830;
         	 margin-left:0px;
                  position:absolute;
                  top:10px;
                  left:7px;"></div>
[END]
toyde ·

Mach doch sowas:

temp.MYSTUFF = HTML
temp.MYSTUFF.value = <div style="background-image:url(fileadmin/template/main/images/index_lehr.jpg);
                 background-repeat:no-repeat;
                 height:130px;
                  width:830;
                 margin-left:0px;
                  position:absolute;
                  top:10px;
                  left:7px;"></div>

[globalVar = TSFE:id = 11]

temp.MYSTUFF.value >
temp.MYSTUFF.value = <div style="background-image:url(fileadmin/template/main/images/index.jpg);
                 background-repeat:no-repeat;
                 height:130px;
                  width:830;
                 margin-left:0px;
                  position:absolute;
                  top:10px;
                  left:7px;"></div>
[global]

Vorteile:

» temp.MYSTUFF kannst Du dann reinkopieren wo Du willst. Das PAGE Objekt wird wohl erst unterhalb deiner Condition definiert, da bringt dir das herzlich wenig, wenn Du schon davor damit arbeiten möchtest.
» Du brauchst keine Condition für den Default-Wert. Darum hab ich ihn Dir auch davor gestellt.

grüsse

Notiz:
"temp.MYSTUFF.value =" möchte natürlich eine einzeilige Eingabe, ist hier falsch dargestellt.