{% load fullcalendar %}

{% for item in page.get_content_model.sidebaragenda_set.all %}
    {% if item.visible %}
        <aside class="sidebar agenda collections-sidebar-container row">
            <div class="collections-sidebar col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <h2 class="sidebar-title"><i class="gd gd-agenda"></i> Agenda</h2>
                <div class="sidebar-content">

                    {% if item.type == 'AL' %}
                        {% get_agenda limit=6 as items %}
                    {% elif item.type == 'SM' %}
                        {% get_site_and_main_agenda limit=6 as items %}
                    {% elif item.type == 'MA' %}
                        {% get_main_agenda limit=6 as items %}
                    {% else %}
                        {% get_site_agenda limit=6 as items %}
                    {% endif %}

                    {% for item in items %}
                    <div class="sidebar-item">
                        <a href="//{{ item.event.site }}{{ item.get_absolute_url }}">
                            <h3>{{ item.start_time|date:"j F Y" }}</h3>
                            <p>{{ item.title }}</p>
                        </a>
                    </div>
                    {% endfor %}

                    <a class="sidebar-link" href="{% url 'fullcalendar-calendar' %}">Alle activiteiten <i class="gd gd-arrow-right-o"></i></a>
                </div>
            </div>
        </aside>
    {% endif %}
{% endfor %}
{% load fullcalendar %}

{% for agenda in page.get_content_model.sidebaragenda_set.all %}
    {% if agenda.visible %}
        <aside class="sidebar agenda collections-sidebar-container row">
            <div class="collections-sidebar col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <h2 class="sidebar-title"><i class="gd gd-agenda"></i> Agenda</h2>
                <div class="sidebar-content">

                    {% if agenda.type == 'AL' %}
                        {% get_agenda limit=6 as items %}
                    {% elif agenda.type == 'SM' %}
                        {% get_site_and_main_agenda limit=6 as items %}
                    {% elif agenda.type == 'MA' %}
                        {% get_main_agenda limit=6 as items %}
                    {% else %}
                        {% get_site_agenda limit=6 as items %}
                    {% endif %}

                    {% for item in items %}
                    <div class="sidebar-item">
                        <a href="//{{ item.event.site }}{{ item.get_absolute_url }}">
                            <h3>{{ item.start_time|date:"j F Y" }}</h3>
                            <p>{{ item.title }}</p>
			    {% if agenda.type == 'AL' %}
				<p>{{ item.site.name }}</p>
			    {% endif %}
			    
			    	
			    	
                        	    
                        </a>
                    </div>
                    {% endfor %}

                    <a class="sidebar-link" href="{% url 'fullcalendar-calendar' %}">Alle activiteiten <i class="gd gd-arrow-right-o"></i></a>
                </div>
            </div>
        </aside>
    {% endif %}
{% endfor %}

Change to Calendar afdelingen added
Change to Calendar afdelingen added
