Is there a way to set 'default enabled' for collective.collectionfilter.
Basially, I want to have 'MyType" default to Photo instead of 'All' which is the 'default behaviour'.
[ ] All
Photo
[ ] Coat of arms
[ ] Something else
Is there a way to set 'default enabled' for collective.collectionfilter.
Basially, I want to have 'MyType" default to Photo instead of 'All' which is the 'default behaviour'.
[ ] All
Photo
[ ] Coat of arms
[ ] Something else
Add the criterion as a get parameter to the url.
In a previous project we linked from specific area's of the site to a generic collectionfilter in the siteroot that would have preset facets with url params.
This is also how a collectionfilter tile with suppor tiles on a Mosaic page can work by updating the query parameters in the location bar.
Thank, that should probably be 'good enough' (theoretically, the collection is still there so searches will lead to it 'without the parameters'
There's a PR for a quite similar problem: if you want to disable the "all" option and want the first value selected instead: Disable _all_ filter option by JeffersonBledsoe · Pull Request #138 · collective/collective.collectionfilter · GitHub ... in my comments I stated some concerns about the extra redirect on loading the page, but I could not come up with a better solution so far.
I actually use the 'parameters from the url' here: Bestill — Portal F.I.K
But due to the norwegian unicode letters, I have to 'manually make the urls' (due to a bug in the UI‚ so the users call me instead of fixing it themselves'. Because of that I was hoping there was a way to set 'default' on the collection instead.