Typo3 FCE refer a field inside a container field

。_饼干妹妹 提交于 2019-12-08 06:52:40

问题


Here is the screen shot of mapping of my FCE:

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:

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:


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

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


来源:https://stackoverflow.com/questions/12913835/typo3-fce-refer-a-field-inside-a-container-field

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!