Apostrophe CMS Main Site Forum Home

Checking if my widget has content


Hi guys, I need to check with an if/else statement if my widget has content or not.
This is my code but not working:

  {% if emotionalScreen.hasContent %}
    <section class="content"><section/>
  {% endif %}

    apos.area(data.page, 'emotionalScreen', {
        widgets: {
          'emotionalScreen': {}

How can I do?


Hi JP, please post how-to questions to stackoverflow, tagged apostrophe-cms. This forum is for announcements and general discussion of Apostrophe’s future.