Skip to Content
1
Aug 02, 2020 at 05:49 AM

Check if content slot is empty to avoid div space in jsp

120 Views

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.