Hallo Till,

eine andere Möglichkeit ist natürlich, dass du eine Erweiterungstemplate für
die entsprechende Seite anlegst und dort die Javascript-Datei einbindest.

Um mit einer Condition zu arbeiten kannst du ja auch in den Constants eine
Konstante einrichten, die die Page ID an zentraler Stelle festlegt, und sich
somit auch leicht ändern lässt wenn dies einmal notwendig sein sollte. In
der Condition gibst du dann statt der hart codierten PID die Konstante an,
z. B. so:

Constants:
myPageId = 123

Setup:
[globalVar = TSFE:id={$myPageID}]
page.includeJS.myFile1 = myfile.js
[global]

So mache ich das immer.

Gruß, Johannes.



> -----Ursprüngliche Nachricht-----
> Von: typo3-german-boun...@lists.typo3.org 
> [mailto:typo3-german-boun...@lists.typo3.org] Im Auftrag von 
> Olaf Schuemann
> Gesendet: Mittwoch, 19. März 2014 00:39
> An: German TYPO3 Userlist
> Betreff: Re: [TYPO3-german] TS Setup für einzelne Seite
> 
> Hallo Till,
> 
> schau Dir doch mal "Template on next Level" an - ich denke, 
> das ist das was Du sucht.
> 
> Das zweite Template enthält dann sowas wie
> page.includeJS.myFile1 >
> 
> BG
> OLAF
> 
> schrieb g4-l...@tonarchiv.ch, am 19.03.14 00:26:
> > Hallo Liste,
> >
> > das ist vermutlich mal wieder ne dämliche Frage, aber ich 
> finde gerade 
> > keine elegante Lösung.
> >
> > Das Problem ist folgendes: Ich u.a. habe einen Zweig in meinem 
> > Seitenbaum, der so aussieht
> >
> > -- Seite 1
> >       Seite 1.1
> >       Seite 1.2
> >
> > Nun möchte ich auf Seite 1 ein JS einbinden, welches aber 
> auf Seiten 
> > 1.1 und 1.2 nicht geladen werden soll.
> > Natürlich könnte ich einfach im root Template eine 
> Condition für Seite 
> > 1 verwenden. Ich möchte aber keine hart codierten PIDs 
> verwenden und 
> > das TS lieber im Backend direkt auf die entspr. Seite 
> setzen,  indem 
> > ich dort einen Template Record mit entspr. Setup Code hinzu füge.
> >
> > Gibt es ein Konstrukt, um in TS festzulegen, dass das Setup nicht 
> > weiter vererbt wird?
> >
> > Grüße,
> > Till
> > _______________________________________________
> > TYPO3-german mailing list
> > TYPO3-german@lists.typo3.org
> > http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-german
> >
> _______________________________________________
> TYPO3-german mailing list
> TYPO3-german@lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-german
> 

_______________________________________________
TYPO3-german mailing list
TYPO3-german@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-german

Antwort per Email an