In v2, I could use the following code, and if there was no category query string, it would return all results. This was a super easy way to not have to duplicate code inside conditionals.
{{ collection:blog limit="9" paginate="true" as="posts" taxonomy:tags="{ get:category }" }}
In v3, the collection tag returns nothing if there is no category query string. It also returns nothing if the taxonomy:tags parameter is empty, like if you do this:
{{ collection:blog limit="9" paginate="true" as="posts" taxonomy:tags="" }}
Ideally, this would behave the same way as in v2. This would ease migration pains, as well as allow for cleaner code.
Statamic 3.0.0 Pro
Laravel 7.25.0
PHP 7.3.17
No addons installed
statamic/statamic, then migrated from v2 with official migrator pluginI need this to work as in V2 to be able to successfully migrate multiple of my V2 sites. + 1!
@fitzage Did you find a way around this, in v3? Got everything else working after migrating my online store from v2 to v3, but this is crucial, as my product listing index is dependent on filters to give a good user experience.
I just created multiple collection loops wrapped in conditional statements for now. Having to duplicate the code annoys me, but I haven鈥檛 figured out how to make a custom filter that works.
I'll try and work this into an upcoming release.
I've submitted a pull request to implement/fix this issue: #2672.
THANK YOU FOR THIS
馃帀 @damcclean 馃帀
Most helpful comment
I'll try and work this into an upcoming release.