Markus Bischof
Markus Bischof

Reputation: 189

Render flux:field.inline.fal from page in content

I have defined a a FAL resource in my page template

<flux:field.inline.fal name="imageLinkboxMenu"
                             clear="true"
                             label="FAL image"
                             showThumbs="true"
                             allowedExtensions="jpg,jpeg,gif,png"
                             maxItems="1"/>

Now i want display this image in a conent element which refers to this page. I'm not able to get the page resource. I tried a

<flux:form.data field="tx_fed_page_flexform" table="pages" uid="{root}" as="fluxPageData">
    {fluxPageData.imageLinkboxMenu}
</flux:form.data>

Which only returns 1. I also tried to acces the field via v:page.resource.fal which can not work from my point of view since this does not extract the data from the XML

<v:resource.image identifier="{v:page.resources.fal(field: 'imageLinkboxMenu') -> v:iterator.extract(key: 'id') -> v:iterator.first()}" as="resources" />

Any hints for me?

Upvotes: 0

Views: 1312

Answers (2)

Oleh V Karun
Oleh V Karun

Reputation: 736

I don't now why but it not work for some translation pages. I receive empty area. Aslo here https://fluidtypo3.org/viewhelpers/flux/master/Field/Inline/FalViewHelper.html we see Usage warning. So i recommend alternatively, you could use <flux:field.file>.

Upvotes: 0

Markus Bischof
Markus Bischof

Reputation: 189

After some trial and error I finally got it work. The trick was to add to uid of the page. So I ended up with something like

<v:resource.image identifier="{v:page.resources.fal(field: 'imageLinkboxLogo', uid: '{root}') -> v:iterator.extract(key: 'id')}" />

Upvotes: 2

Related Questions