hello, I've been referring to this post http://www.couchcms.com/forum/viewtopic.php?f=8&t=8952&p=18166&hilit=+tag+blog#p18166 and thought it would be useful for my purposes.
The requirement is for events to be categorised - could be in more than 1 category - and for there to be the ability to filter the events by category. I have said to the client that I will lay the foundations for this functionality so that it can be implemented at some future date as the deadline is looming.
However I think I may have set it up incorrectly ... what I have is this:
whats-on.php which is the clonable template for each event - this has an editable region like this:
event-categories.php is like this:
whats-on.php is doing all the displaying of events - list view showing the event listing and page view the details of a single event. I am displaying the categories an event is in like so:
It is simply an extra piece of information about the event ... JAZZ for example - no links or functionality.
When I come to apply the 'filters' to allow the list view to display say just Jazz events or just Classical events I would want these filters / links to be in the whats-on.php template - like sub-navigation filters. BUT I've been having a bit of an experiment for another part of the site and it appears that the filtering functionality would work from within the event-categories.php and NOT from whats-on.php
I suspect I have set this up wrongly in order to apply filtering in the way described here - http://www.couchcms.com/forum/viewtopic.php?f=8&t=8952&p=18166&hilit=+tag+blog#p18166 . It'll be hard to backtrack and say I can't do it now! Please could you advise if I've gone down the wrong path - many thanks!
The requirement is for events to be categorised - could be in more than 1 category - and for there to be the ability to filter the events by category. I have said to the client that I will lay the foundations for this functionality so that it can be implemented at some future date as the deadline is looming.
However I think I may have set it up incorrectly ... what I have is this:
whats-on.php which is the clonable template for each event - this has an editable region like this:
- Code: Select all
<cms:editable name='event_category' type='relation' masterpage='event-categories.php' desc="check one or more of these, add new category using Event Categories link in the sidebar" label='EVENT CATEGORIES' order='17' />
event-categories.php is like this:
- Code: Select all
<?php require_once( 'admin/cms.php' ); ?>
<cms:template title='Event Categories' clonable='1' order='47'></cms:template>
<?php COUCH::invoke(); ?>
whats-on.php is doing all the displaying of events - list view showing the event listing and page view the details of a single event. I am displaying the categories an event is in like so:
- Code: Select all
<cms:related_pages 'event_category' >
<cms:if k_count gt '1'> | </cms:if><cms:show k_page_title />
</cms:related_pages>
It is simply an extra piece of information about the event ... JAZZ for example - no links or functionality.
When I come to apply the 'filters' to allow the list view to display say just Jazz events or just Classical events I would want these filters / links to be in the whats-on.php template - like sub-navigation filters. BUT I've been having a bit of an experiment for another part of the site and it appears that the filtering functionality would work from within the event-categories.php and NOT from whats-on.php
I suspect I have set this up wrongly in order to apply filtering in the way described here - http://www.couchcms.com/forum/viewtopic.php?f=8&t=8952&p=18166&hilit=+tag+blog#p18166 . It'll be hard to backtrack and say I can't do it now! Please could you advise if I've gone down the wrong path - many thanks!