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...
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.
Showing 45 reactions
Sign in with
Act for America
Greg Evers for Congress
Marston Digital Solutions
Certified Architect
Certified Expert
Act for America
Greg Evers for Congress
Marston Digital Solutions
Certified Architect
Certified Expert
{% for event in page.calendar.events_upcoming limit:2 offset:0 }
<div class=“padtopmore”></div>
<div style=““font-weight:”><a href=“%7B%7B%20event.url%20%7D%7D”><h3>{{ event.headline }}</h3></a></div>
<div class=“padtopless”></div>
<div class=““event_teaser””>
{{ event.event.content | strip_html | truncatewords: 30 }}
</div>
<div class=“padtopmore”></div>
<div class=““continue_reading””>
<a href=“%7B%7B%20event.url%20%7D%7D”>RSVP Now!</a>
</div>
{ endfor %}
What I can’t figure out is how to get the date of the event to display as well. I’ve tried some of the suggestions in this stream as well as things from http://nationbuilder.com/liquid_basics.
If anyone has any other ideas, I’d love to see them.
-——————————————————————————{% for event in page.calendar.events_upcoming limit:3 offset:0 }
<div style=“font-weight: bold; font-size: 16px;”>
<a href=“%7B%7B%20event.url%20%7D%7D”>{{ event.headline }}</a>
<br><span style=“font-weight: light; font-size: 10px;”>
{{ event.event.local_start_at | date: ‘%B %d, %Y at %I:%M %p’ }}
<br><span style=“font-weight: light; font-size: 10px;”>
{{ event.event.content | strip_html | truncatewords:15 }}
<br><a href=“%7B%7B%20event.url%20%7D%7D”>Sign Up Now …</a></span></span>
</div>
<hr>
{ endfor }
-—————————————————————————And here is the code I used on the supporter_nav page (you’ll find it on the Custom Theme heading:
-———————————————————————————<div class=“events_feed” style=“background-color: ”tweet-url hashtag" href=“https://twitter.com/#!/search?q=%23efefef” title=“#efefef”>#efefef; padding: 10px;">
{ subpage “calendar” with “calendar_latest” %}
</div>
-—————————————————————————Obviously, you’ll want to redo the CSS and other styling elements. But the key is in the code in the calendar_latest file. Note that the object variable for each event is coded “event.event.xx”
Hope this helps.
Act for America
Greg Evers for Congress
Marston Digital Solutions
Certified Architect
Certified Expert
{% for event in page.calendar.events_upcoming limit:1 offset:0 %}
<div style=“font-weight: bold; font-size: 16px;”><a href=“%7B%7B%20event.url%20%7D%7D”>{{ event.headline }}</a></div>
<div class=“event_teaser”>
{{ page.calendar.content | strip_html | truncatewords:20 }}
</div>
<div class=“continue_reading”>
<a href=“%7B%7B%20event.url%20%7D%7D”>Sign Up Now</a>-></div>
<hr>
{% endfor %}
What I am trying to accomplish is to have the first 20 words of the Intro Blurb display on the home page.
What am I doing wrong?
{% for event in page.calendar.events_upcoming limit:10 }
{ include “event” }
{ endfor %}
So go to _event.html, copy all the contents to your clipboard, then replace {% include “event” %} with those contents, and tweak anyway you want.
Upcoming Events and Meetings:
Holiday Home Tour – November 30, 2012
January Board Meeting – January 12, 2013
February Pubic Meeting – February 5, 2013, etc.