Forum
Better documentation for Events list/detail template setup
It would be great if someone could give a brief outline of the process that they used to get a simple list of upcoming events that link to a detail page for that one specific event. This seems to be the most basic need for the Events app, but one that is very poorly documented on the support site.
In the listing I just want the date and event name as a link to a page containing the detailed info. The example files in the events app don't provide a working example of this.
There is a working example of this in the example files. (I've just downloaded the app to make sure it didn't go missing in the last build or something)
If you explain why that isn't working for you then we might be able to help.
I expected the events-custom.php page would be set up to work this way, but when I view that I get the full listing and not a list of events.
Have you set the path to your event detail page under Settings in Perch?
The listing pages use a template that has a link to the detail page (event.php in the example files)
Yes, I have my event detail page listed under the Settings.
I've discovered that if I remove the line for 'filter'=>'eventSlug', then all of my entries will display. If I have that in my "event.php" file, then no entries are displayed.
The code in my event.php file is:
and within my event detail page:
Is the "eventSlug" field created automatically by the Events app?
What URL do you have for an event detail page?
Timothy,
I have a rough guide in a document that I was planning to turn in to a blog post, once I get my new site up, as I have been using both the news and events module recently, Let me know if you want me to share.
Thanks
Lee
The url's being generated are https://www.site.org/events/event.php?event=2014-08-13-blue-hill-bay-boat-tour
You could try:
'filter' => 'eventSlug', 'match' => 'eq', 'value' => $_GET['event'],
Regards
Lee
Thanks Lee, that worked great!
Thanks Lee,
I was also having problems clicking through from my listings page to the event page. So I checked the example pages and they also did not work for me either?
Clicking through to a listed event took me to an empty event page
So in the events.php file I replaced 'value'
with
'value' => $_GET['event'],
as suggested and now it's working fine.I had this same issue with the example pages, no data displayed on the detail page. The solution put forth by Lee Goodman and Andy Clark —
'value'=>perch_get('s')
replaced with'value' => $_GET['event']
— worked for me, too.
I have a freshly downloaded and installed (never installed before) copy of the Events app (1.9) and a freshly upgraded Perch 2.6.6.
I experienced this behavior in a test site running on MAMP.
Thank you so much, Lee and Andy, I've been pulling what's left of my hair out over this for a day. This solution worked for me too!