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

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


How to check if content slot has components in it or not in jsp so that we can avoid div space in jsp


<div class="test">

<cms:pageSlot position="TopContent" var="feature">

<cms:component component="${feature}" element="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.