[TYPO3-UG NRW] Typo3 6.2 Template Verzweiflung

Philipp Gampe philipp.gampe at typo3.org
Sun Sep 7 13:01:49 CEST 2014


Hi Jens,

Jens Dinspel wrote:

> Hier mal das Beispiel, welches ich ausprobiert habe.
> 
> page=PAGE
> page{
> typeNum=0
Nicht nötig. Default ist immer 0.

> 10=FLUIDTEMPLATE
> 10{
> template=FILE
> template.file=fileadmin/templates/MyTemplate.html
> 
> variables{
> mylabel=TEXT
> mylabel.value=LabelcomingfromTypoScript!

content0 < styles.content.get
content1 < styles.content.getLeft
content2 < styles.content.getRight

> }
> 
> settings{
> # Get the copyright year from a TypoScript constant.
> copyrightYear={$year}
> }
> lib.content0<styles.content.get
> 
> lib.content1<styles.content.get
> lib.content1.select.where=colPos=1
> 
> lib.content2<styles.content.get
> lib.content2.select.where=colPos=2

Das hier sollte außerhalb der Klammern stehen. Oder einfach ganz weglassen 
und den Code oben benutzen.
Im Moment steht hier page.template.10.lib.content1 ....

Du meinst aber lib.content (also auf der obersten Ebene).
Schau dir dies am besten mit dem TypoScript Object Browser (Web>Template) 
an.

> }
> }
> 
> # Assign the Template files with the Fluid Backend-Template
> page.10.file.stdWrap.cObject=CASE
> page.10.file.stdWrap.cObject{
> key.data=levelfield:-1,backend_layout_next_level,slide
> key.override.field=backend_layout
> 
> # Set the default Template, our 3 column Template
> default=TEXT
> default.value=fileadmin/templates/threeColumn.html
> 
> # Set also the first [2] Template, our 3 column Template
> 2=TEXT
> 2.value=fileadmin/templates/threeColumn.html
> 
> # Set a second [3] Template, our full size Template
> 3=TEXT
> 3.value=fileadmin/templates/fullSize.html
> }

Ich hoffe 2 und 3 sind die Uids der jeweiligen Backend Layout Records. 
Ansonsten klappt das nicht. Allerdings sollte immer der Default Fall 
greifen.

Der Übersichtlichkeit wegen würde ich dies aber noch oben in den 
page.10.template.file. Block mit hinein ziehen. Die dortige Definition ist 
darüber hinaus überflüssig.

Ach ja, es fehlt natürlich der template Teil des Pfades.

 
> In den Template Files sind die passenden Objekte definiert.
> 
> zB.
> <div class="wrapper">
> <article>
> <f:cobject typoscriptobjectpath="lib.content0">

lib.content0 ist undefiniert, weil du nur page.10.lib.content0 definiert 
hast.
Allerdings würde ich stattdessen über eine Variable darauf zugreifen (s.o.).

Also einfach nur {content0}, wenn es als page.10.variables.content0 
definiert ist.

> </article>
> <aside>
> <f:cObject typoscriptObjectPath="lib.content1">
> </aside>
> <footer>
> My footer content here.
> </footer>
> </div>

Grüße
-- 
Philipp Gampe – PGP-Key 0AD96065 – TYPO3 UG Bonn/Köln
Documentation – Active contributor TYPO3 CMS
TYPO3 .... inspiring people to share!



More information about the TYPO3-nrw mailing list