[TYPO3-mvc] Passing single view id to template
Christine Gerpheide
cgerpheide at gmail.com
Thu Oct 21 12:55:55 CEST 2010
2010/10/21 Dawid Pacholczyk <dpacholczyk at gmail.com>
> Hello List,
>
> how can I pass single view page id from my controller to fluid and how can
> I use it in template ?
>
> Best regards,
> Dawid Pacholczyk
>
>
>
Hi Dawid,
You can access it directly in your template like:
<f:link.page pageUid="{settings.singlePageID}" />
If you really want to pass it in from the controller, I suppose you could
do:
$this->view->assign('singlePageId',$this->settings['singlePageID']);
and then in your template:
<f:link.page pageUid="{singlePageID}" />
The first way is simpler though -- less code. Both of these assume you have
it defined in your settings something like
plugin.tx_myext.settings.singlePageID = 123
HTH,
Christine
More information about the TYPO3-project-typo3v4mvc
mailing list