Skip to main content

Display events from a calendar with a certain tag on another page

I'm wanting to display events with certain tags on certain pages. Have followed instructions here and here but am unable to get this to work. Here is what I have:

An event set up with the tag 'fossilfools'.

An html file called '_fossilfools_events.html' with the following code:

<code>

<ul class="event-wrap">
    {% for event in tag.events_upcoming %}
    <li>{% include "event" %}</li>
    {% endfor %}
</ul>

</code>

I've included the following in the template of the page where I want to display all events that have the tag 'fossilfools':

<code>

 {% tag "fossilfools" with "fossilfools_events" %}

</code>

Nothing is displaying. What I am doing wrong?

Official response from


Have had a reply from Nationbuilder and the problem was that I had assumed that the page variable would have to be event related… here’s the solution: 

The reason it is not working is because tag does not have the page variable “events_upcoming.” See all tag page variables here:
http://nationbuilder.com/page_tag_variables 

The first example, for calendar pages, does work because “events_upcoming” is a calendar page variable:
http://nationbuilder.com/calendar_page_variables 

We recommend for the {% for event in tag.events_upcoming } you actually use: { for event in tag.most_recent_published_pages %} 
Share this post

Showing 3 reactions

How would you tag this suggestion?
Please check your e-mail for a link to activate your account.