Skip to main content

Is it possible to get a list of upcoming events?

I'd like a list of upcoming events in my site's sidebar. I'm trying site.upcoming_event_pages but I'm getting an error: 

Liquid error: PGError: ERROR: missing FROM-clause entry for table "types"
LINE 1: ...= "pages".site_id WHERE ("pages".site_id = 1 AND (types.name...

Official response from

Sam,

You would use the method described here to display content from one page on another.

In this example, the code in the partial template _events_latest.html  would look something like this: 

{% for event in page.calendar.events_upcoming limit:5 %} 

{% include "event" %}

{% endfor %}

You would then place {% subpage “xx” with “events_latest” %} in the template, where you want the events to display. The xx corresponds to the calendar page slug.

If you send me a link to the page you are trying to edit I can help point you in the right direction.  

UPDATE: If you are using the Aware theme, you can now display excerpts on your homepage simply by using the page tag homepage. This will display an event on your homepage, in addition to excerpts from other pages. You may want to try this as an option that does not require updating the code of your website. More information on featuring excerpts on your homepage is available.

Share this post

Showing 45 reactions

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