开发者

TYPO3: Wrap RECORDS if not empty or hidden in TemplaVoila

开发者 https://www.devze.com 2023-03-23 05:15 出处:网络
I have a field mapped in TemplaVoila as \"container 开发者_StackOverflow社区of elements\" which generates some Typoscript in \"Data processing\":

I have a field mapped in TemplaVoila as "container 开发者_StackOverflow社区of elements" which generates some Typoscript in "Data processing":

10= RECORDS
10.source.current=1
10.tables = tt_content

# my new added wrap
10.wrap = <div class="someClass"> | </div>

Is there a way to make my new wrap depend on filling this container? I need the same functionality as:

10 = TEXT
10.wrap = not empty: |
10.required = 1

EDIT: I managed to check if any content is in the container:

10= RECORDS
10.source.current=1
10.tables = tt_content
10.stdWrap.wrap = <div class="someClass"> | </div>
10.stdWrap.if {
 isTrue.field = field_contenttop
}
10.stdWrap.debugData = 1

It works but wraps container even if contents inside are hidden. I need to depend wrap on visible elements only.


i guess stdWrap.required = 1 does the job.

10= RECORDS
10.source.current=1
10.tables = tt_content
10.stdWrap.wrap = <div class="someClass"> | </div>
10.stdWrap.required = 1
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号