Thread tagged as: Problem, Runway

Filtering categories & losing the will to live!


Sorry about the link bait title!

I've started a new thread for this to ensure my explanation makes sense,and doesn't get lost down the page.

In Runway I have two category sets (sectors and regions).

I also have a collection called "jobs" with various properties (fields)

Job can only have one type e.g "perm, contract" etc Job can be in multiple sectors (category) Job can be in multiple regions (category)

I am passing a JS object via an ajax call to PHP to filter the jobs list accordingly.

My problem is this, how do I manage the and / or type relationship?

So my query would be something like

$jobs = perch_collection('Jobs', array( 'template' => '_job-list-item.html' , 'filter'=>'jobType', 'match'=>'in', 'value'=>'perm','contract' // selected job types list 'category' => $filters['categories'], // my array of categories passed back 'category-match' => 'any', ));
but I need to match against two different sets e.g
    category = "sectors/pharmaceutical"
    category = "sectors/occupatinal-health"
    category = ("regions/europe/france","regions/europe/uk")

Firstly am I approaching this correctly, i.e is my logic correct here? Secondly how would I approach this?

If anyone can help it would be much appreciated!

Many thanks


Lee Goodman

Lee Goodman 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

You can't currently mix and and or matches for category filters.

bugger! Thanks Drew, any plans to implement this?

I will have to have a rethink.

Drew McLellan

Drew McLellan 2638 points
Perch Support

It's not immediately planned right now, but it's something that we'll probably cover at some point.