On the face of it this seems - to my client - like a simple request (!), but I'm wondering how to go about it ... I already have a template which supports
1. sorting - using this method https://www.couchcms.com/docs/advanced-tutorial/list-view.html and
2. filtering by tag - using this method https://www.couchcms.com/forum/viewtopic.php?f=2&t=9243&p=19515 - the tags are set up as a relation.
There are more details about my use-case in a previous posting: https://www.couchcms.com/forum/viewtopic.php?f=4&t=11262
The request is for 2 checkboxes on the front end which when checked will ensure that certain cloned pages (say, type=x and/or type=y) which are normally excluded will be included in the listing. The listing may already be filtered/sorted (by the current criteria) and then have type=x and/or type=y included OR may initially include type=x and/or type=y and then be filtered/sorted by the current criteria.
So, the user has a listing that is filtered and sorted and he now checks one of the boxes to include type=X - we want the list to remain filtered and sorted and to now include type=X. I can see that I will need to add another parameter to the querystring - something like this:
<a href="<cms:add_querystring k_page_link "tag=<cms:show my_tag />&sort=date&composer=<cms:show my_composer />&include1=<cms:show my_checkbox />" />" >APPLY</a>
BUT how will the value of the checkbox will be retained on the screen after the newly filtered results are displayed when the user has clicked APPLY?
EDIT: of course I wasn't thinking the thing through fully - the checkboxes will need to be form input fields - will this play nicely with adding parameters to querystrings?
1. sorting - using this method https://www.couchcms.com/docs/advanced-tutorial/list-view.html and
2. filtering by tag - using this method https://www.couchcms.com/forum/viewtopic.php?f=2&t=9243&p=19515 - the tags are set up as a relation.
There are more details about my use-case in a previous posting: https://www.couchcms.com/forum/viewtopic.php?f=4&t=11262
The request is for 2 checkboxes on the front end which when checked will ensure that certain cloned pages (say, type=x and/or type=y) which are normally excluded will be included in the listing. The listing may already be filtered/sorted (by the current criteria) and then have type=x and/or type=y included OR may initially include type=x and/or type=y and then be filtered/sorted by the current criteria.
So, the user has a listing that is filtered and sorted and he now checks one of the boxes to include type=X - we want the list to remain filtered and sorted and to now include type=X. I can see that I will need to add another parameter to the querystring - something like this:
<a href="<cms:add_querystring k_page_link "tag=<cms:show my_tag />&sort=date&composer=<cms:show my_composer />&include1=<cms:show my_checkbox />" />" >APPLY</a>
BUT how will the value of the checkbox will be retained on the screen after the newly filtered results are displayed when the user has clicked APPLY?
EDIT: of course I wasn't thinking the thing through fully - the checkboxes will need to be form input fields - will this play nicely with adding parameters to querystrings?