Skip to content

Variable not passed from Layout to Template #1356

Description

@Oktopuce

I have a problem passing argument from a layout to a template.

I have this code in layout file myext/Resources/Private/Layouts/Layout.html :

<f:for each="{news}" as="newsItem" iteration="iterator"> 
  <f:debug title="Section content newsItem">{newsItem}</f:debug> 
  <f:render section="content" arguments="{newsItem: newsItem}" /> 
</f:for>

And this code in Template file myext/Resources/Private/Layouts/Template.html :

<f:layout name="MyLayout" />

<f:section name="content"> 
  <f:debug title="Section content newsItem">{newsItem}</f:debug> 
  <f:render partial="ListItem" arguments="{newsItem:newsItem}" /> 
</f:section>

{newsItem} is filled in layout but not in template, I used TYPO3 V13 with latest version.
It used to work with TYPO3 V12.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions