[TYPO3-dev] Re: How to manually render a page
Philipp
philippwrann at gmx.at
Wed Mar 20 15:49:29 CET 2013
Finally solved it via TS rendering Fluidtemplates switched on pagerecord setting, also layout....
Only "bugy" thing left, the slide of those settings is broken...
My approach:
Extended pages table with field pages.
added a backend layout for called multipage, it has no columns... you just link pages that will be displayed here. Can link them in a group field...
If the backend layout is set and the page is rendered a fluid template is included. it calls
<f:for each="{f:cObject(typoscriptObjectPath:'lib.pages') -> d:explodeValues()}" as="page">
<f:cObject typoscriptObjectPath="lib.renderContents">{page}</f:cObject>
</f:for>
lib.pages simply gets the pages field of the current page record.
lib.pages = COA
lib.pages {
10 = TEXT
10.data.insertData = 1
10.data = DB:pages:{page:uid}:pages
}
renderContents works as follows
lib.renderContents = COA
lib.renderContents {
20 < lib.multipageSection
20.file.stdWrap.cObject.key.data.current = 1
20.file.stdWrap.cObject.key.data.wrap = DB:pages:|:backend_layout
20 {
variables {
sectionClass < lib.sectionClass
sectionClass.key.data.current = 1
sectionClass.key.data.wrap = DB:pages:|:layout
}
}
}
multipageSection:
lib.multipageSection < lib.*****FluidTemplate
lib.multipageSection {
variables {
sectionClass < lib.sectionClass
header < tmp.localContent
header.select.where = colPos = 1
content < tmp.localContent
content.select.where = colpos = 0
sidebar < tmp.localContent
sidebar.select.where = colpos = 2
sidebar.renderObj.stdWrap.wrap = <aside class="regular right">|</aside>
}
file < ajaxReturn.10.file
}
ajaxReturn because it provides the same functionallity as i need it. The rest should be clear....
That works well except for the levelslide but i can live with the fact, that the user has to assign those settings in case of those multipages.
Maybe this helps someone
kind regards
More information about the TYPO3-dev
mailing list