Forum

Thread tagged as: Question, Addons, Events

Events categories

Hi

How do you output the category image an event belongs to?

<perch:events id="category_names" /> outputs the name but how do you get the image?

Thanks

Paul Langley

Paul Langley 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

You would need to use perch_events_category() for that.

do you mean perch_events_categories()?

how do i get an image in a template thought? i.e. i can get category names by using: <perch:events id="category_names" />

Thanks

Drew McLellan

Drew McLellan 2638 points
Perch Support

perch_events_categories() will give you a list of categories, and perch_events_category() outputs a single category, based on the slug or ID you pass in as the first argument.

ok - is this not documented?

ta

Also, this (<perch:events id="categoryFutureEventCount" />) always shows 0 - any ideas?

Ta

Drew McLellan

Drew McLellan 2638 points
Perch Support

How many future events are there in that category?

there is 1

Ta

Drew McLellan

Drew McLellan 2638 points
Perch Support

If you add a second, does that change?