I need to filter a sections entries by more than one category but only return entries that belong to all category id's passed in a URL parameter.
Now I can get the correct output if the id's are hard coded but not if contained in the URL parameter.
URL: ajax-swatches?cats=171,172,179
{% set catPars = craft.request.getParam('cats') %}
{% set swatches = craft.entries({ section: 'swatches', relatedTo: ['and',catPars] }) %}
I presume the 'relatedTo' section is treating the 'catPars' variable as a single entry and ignoring the ',' and next values?
Any help would be really appreciated :)