TYPO3 flux: Access page settings in content element

raw

README.rst

I want to access settings from the page configuration when a content element is rendered.

Search keywords:

  • fluidpages settings in fluidcontent
  • typo3 flux content element read flux page settings
  • typo3 parse tx_fed_page_flexform

Solution

Manually parse the flexform data. "page" contains the page record.

Nested form:

<flux:form.data table="pages" field="tx_fed_page_flexform" record="{page}" as="pagesettings">
  <f:debug>{pagesettings.settings.accentcolor}</f:debug>
</flux:form.data>

With an variable:

<v:variable.set name="pagesettings" value="{flux:form.data(table:'pages', field:'tx_fed_page_flexform', record: page)}"/>
<f:debug>{pagesettings.settings.accentcolor}</f:debug>

https://viewhelpers.fluidtypo3.org/fluidtypo3/flux/9.0.1/Form/Data.html

Christian Weiske Christian Weiske
owner

History