Search code examples
typo3fluidtypo3-6.2.x

Use v:content.render in a Contentelement


I try to render some Elements from another page via fluid in a Partial and try to use v:content.render. As you can see in the code I want to render 3 elements from the page with the Uid 9. But as soon as I have the v:content.render element in it I just get a blank page.

So my question is how to use v:content.render or what alternative I have? Or do I still need to use Typoscript for that?

{namespace v=FluidTYPO3\Vhs\ViewHelpers}
<div class="footer2">

    <v:content.render column="0" limit="3" pageUid="9" as="contentElements">
      <f:for each="{contentElements}" as="contentElement" iteration="footerIteration">
        <f:format.html>{contentElement.bodytext}</f:format.html>
      </f:for>
    </v:content.render>

</div>

I am not sure if it is important, but the elements on the Page 9 are also fluid content elements.


Solution

  • I found a solution that works:

    <v:variable.set name="contentElements" value="{v:content.get(column:'0', limit:'3', pageUid:'9',  render:'FALSE')}" />
    
      <f:for each="{contentElements}" as="contentElement" iteration="footerIteration">
        <v:content.render contentUids="{0:contentElement.uid}" />
        <f:format.html>{contentElement.bodytext}</f:format.html>
      </f:for>