Typo3 FCE refer a field inside a container field

2019-06-03 15:08发布

Here is the screen shot of mapping of my FCE:

enter image description here

I can refer 'Caption' field by 'field_caption' from the typoscript of 'Link' field.

Here is the typoscript for that:

    10 = TEXT
    10.field = field_caption

How to refer the 'Image' field which is inside a container field 'Image and alternate text' From the typoscript of 'Link' field?

I tried to refer it directly by using 'field_image', but it is not working.

here is the screen shot: enter image description here

Markup I am trying to map is:

    <a href="resources/img/site/demo1.jpg">
      <img src="resources/img/site/demo1.jpg" alt="alternate text" />
      <div class="flex-caption">
        <p>caption text</p>
      </div>
    </a>

1条回答
霸刀☆藐视天下
2楼-- · 2019-06-03 15:31

Ok, you want to wrap the image with a link. Actually you have to do it the other way round.

enter image description here

In my case the span link has display:none; because it's my link placeholder. In your scenario it is field_link.

Now click to edit your field_image and click on data processing. Edit TS Code:

10 = IMAGE
10.file.XY = 200,150
10.file.import = uploads/tx_templavoila/

10.stdWrap.typolink.parameter.field = link

This last line wraps the image with a link. In your case it would be

10.stdWrap.typolink.parameter.field = field_link
查看更多
登录 后发表回答