on 2020 Aug 02 6:49 AM
How to check if content slot has components in it or not in jsp so that we can avoid div space in jsp
ex:
<div class="test">
<cms:pageSlot position="TopContent" var="feature">
<cms:component component="${feature}" element="div"/>
</cms:pageSlot>
</div>
Instead of having empty div if TopContent does not have any components, i want to check if TopContent has no components then add the above code.
Please let me know if there is a way to achieve it.
Request clarification before answering.
<cms:pageSlot position="TopContent" var="feature">
<c:if test="${not empty feature}">
<div class="test">
<cms:component component="${feature}" element="div"/>
</div>
</c:if>
</cms:pageSlot>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.