Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TYPO3: Wrap RECORDS if not empty or hidden in TemplaVoila

I have a field mapped in TemplaVoila as "container 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.

like image 582
avall Avatar asked Feb 24 '23 11:02

avall


1 Answers

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
like image 127
maholtz Avatar answered Apr 02 '23 03:04

maholtz