Reputation: 6158
This question is related to Access fluidpage configuration in template.
I try the same as in the question above. But as flux:flexform
is outdated and replaced with flux:form
there may be some changes I'm not aware of.
With the following code I try to access the flex:form.fields from the menu-items:
<v:page.menu levels="1" as="sections">
<ul class="main-navi">
<f:for each="{sections}" as="section" iteration="iteration">
<f:debug>{section}</f:debug>
<flux:form.data table="pages" field="tx_fed_page_flexform" uid="{section.uid}" as="sectionData" />
<f:debug>{sectionData}</f:debug>
<li {f:if(condition: section.active, then: ' class="active"')}>
<f:link.page pageUid="{section.uid}" title="{section.linktext}">{ section.title}</f:link.page>
<div class="testmenu"></div>
</li>
</f:for>
</ul>
</v:page.menu>
In the Debug of the section (<f:debug>{section}</f:debug>
) I see the value of tx_fed_page_flexform:
tx_fed_page_flexform => '<?xml version="1.0" encoding="utf-8" standalone="
;yes" ?> <T3FlexForms> <data> <sheet inde
x="options"> <language index="lDEF">
; <field index="text"> &
lt;value index="vDEF">test1234</value> &l
t;/field> </language> </sheet> </d
ata> </T3FlexForms>' (336 chars)
The value I search is test1234
.
But when I debug the sectionData (<f:debug>{sectionData}</f:debug>
) I just get a NULL
.
Upvotes: 0
Views: 746
Reputation: 6158
Found a solution. To set sectionData use v:variable.set
. the as
in flux:form.data
seems not to work.
<v:variable.set name="sectionData" value="{flux:form.data(table:'pages', field:'tx_fed_page_flexform', uid:'{section.uid}')}" />
Upvotes: 1