Created
November 17, 2014 14:41
-
-
Save tv-schulz/5fbd0a1e68f77d7bd73f to your computer and use it in GitHub Desktop.
One Pager Rendering VHS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<v:page.menu entryLevel="0" levels="1" expandAll="FALSE" as="subpages"> | |
<f:for each="{subpages}" as="subpage"> | |
{subpage.uid -> v:variable.register.set(name: 'subpage')} | |
<v:render.request action="render" controller="Page" arguments="{page:subpage}" pageUid="{subpage.uid}" extensionName="ExtKey" vendorName="Vendor" /> | |
</f:for> | |
</v:page.menu> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function getRecord() { | |
// this function is needed to determine the current page. when rendering an one pager layout we need to mock the current page id | |
$id = $GLOBALS['TSFE']->id; | |
if(isset($GLOBALS['TSFE']->register['subpage'])){ | |
$id = $GLOBALS['TSFE']->register['subpage']; | |
} | |
return $this->workspacesAwareRecordService->getSingle($this->fluxTableName, '*', $id); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I hope you can help me with this..
I'm quite new to Typo3 and I'm trying to render various pages in a single page, too. I've got different approaches. But I always start with getting the pages via this:
< v:page.menu entryLevel="-1" levels="1" as="sections">
< f:for each="{sections}" as="section" iteration="iteration">
< m:Content pid="{section.uid}" />
< /f:for>
< /v:page.menu >
I'm using a ViewHelper m to render the Content Objects of every page. But I can't figure out how to get the page template rendered with it.
It seems like your solution works including the page template, but I'm not exactly getting how your PageController works. Looks to me like there is an important part missing in the code snippet?
Could you please explain how it works or post some more code?
Thank you so much in advance!