1
votes

I'm trying to access the settings of a Fluidtypo3 FCE element. My FCE is a news article that I want to include in another FCE, which is a slider. The slider only has one field and the configuration is the following:

<flux:field.relation
            name="articles"
            label="News-Beitrag"
            multiple="true"
            size="6"
            table="tt_content"
            condition="AND tt_content.pid = {record.pid} AND CType = 'fluidcontent_content' AND colPos = 1 AND sys_language_uid = {record.sys_language_uid}"
            minItems="1"
            maxItems="10"
            renderMode="default"
            />

This configuration works, I can select all my news FCE's as a relation. The field articles saves the uid's of all referenced FCE's. Now I am trying to use these uid's to receive the content. Right now my code is the following:

<f:section name="Main">

    <f:if condition="{articles}">

        {v:iterator.explode(content: '{articles}', glue: ",", as: 'articles')}

        {v:content.get(contentUids: "{articles}", render: 0) -> v:variable.set(name: 'slides')}

        <f:for each="{slides}" as="element">
        </f:for>

    </f:if>

</f:section>

The <v:content.get> ViewHelper gets the tt_content record as it is recorded in the database. The flux settings are stored in XML-Format in the field pi_flexform. I am trying to access those specific flux settings one by one and not just the whole pi_flexform field in xml format.

I've looked for ViewHelpers that can convert XML to an Array and tried many other things, but nothing worked for me. I am grateful for any ideas how to solve this problem.

1

1 Answers

2
votes

<flux:form.data> is the Viewhelper you seek. You can use it like this:

<f:for each="{slides}" as="element">
    <flux:form.data table="tt_content" field="pi_flexform" record="{element}" as="flexformData">
        <!-- Do stuff with flexformData -->
    </flux:form.data>
</f:for>