Depending on the circumstance that a repeatable region actually contains data, I would like to output some HTML. If the region is empty, it should not show it.
For example, I defined the following repeatable region in the head section:
I then normally output it like this:
However, I would like to show the h3-header "Requirements" only in the case that the repeatable region actually contains data and is not empty.
So far, I tried the following (both candidate_requirement / candidate_requirements), which does not work. The header does not show up, although a data set is available:
Any idea?
For example, I defined the following repeatable region in the head section:
- Code: Select all
<cms:repeatable name='candidate_requirements' label='Requirements' order='5' >
<cms:editable name='candidate_requirement'
height='50'
type='textarea' />
</cms:repeatable>
I then normally output it like this:
- Code: Select all
<h3><small>Requirements</small></h3>
<ul>
<cms:show_repeatable 'candidate_requirements' >
<li><cms:show candidate_requirement /></li>
</cms:show_repeatable>
</ul>
However, I would like to show the h3-header "Requirements" only in the case that the repeatable region actually contains data and is not empty.
So far, I tried the following (both candidate_requirement / candidate_requirements), which does not work. The header does not show up, although a data set is available:
- Code: Select all
<cms:if "<cms:not_empty candidate_requirement />" >
<h3><small>Candidate Requirements</small></h3>
</cms:if>
Any idea?