Skip to content

Agenda Box does not show Event if Content type is not assigned

Summary

Add the word "Event" displayed in the case where there is no content type assigned to the agenda box.

Possible fixes

In agenda-box.html.twig the assigned of content_type should have an else clause for the case when there is no content_type assigned:

 {% if content_type | render %}
            {% set ct = '' %}
            {% if content_type | render | striptags | trim == "Event Page" %}
                {% set ct = 'Event' %}
            {% endif %}
            {% if content_type | render | striptags | trim == "Indico Event" %}
                {% set ct = 'Event' %}
            {% endif %}
            {% if content_type | render | striptags | trim == "Webcast Event" %}
                {% set ct = 'Webcast' %}
            {% endif %}
            <div class="agenda-box-content-type">
                {{ ct|t }}
            </div>
        {% endif %}
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information