0

i'm using exp:calendar:events to show all events that belong to certain dates and categories. Now i have 2 URL segments {segment_2} and {segment_3} that show category ids for example {segment_2} is category 6 and {segment_3} is category 17

if i have category="{segment_2}|{segment_3}" i get entries that belong either to one category or another.

The same happens if i put category="6|17" avoiding segments

What i really want is to get the results for category 6 AND category 17 (entries that belong to both these categories)

is that possible in a straightforward way? if not can it be used in combination with Low Seg2Cat or some other tool?

Thanks

  • EE 3.4.7 and Calendar (ver 3)

2 Answers 2

1

As stuartmcd69 says, what you need to do is use the & character instead of |. However, the current version of Calendar (2.2.3) has a bug where this does NOT work. We're close to releasing a 2.3.0 version that will include a bug fix for this though.

If you need a patch now, just create a support ticket here :)

2
  • Thank you for the speed in your response ... i realised that it is a bug as it does not work after many tries Commented Apr 10, 2017 at 14:59
  • I confirm that it is a bug as category="x&y" does not produce the expected results Commented Apr 10, 2017 at 15:01
2

According to the docs, using the pipe character will return results if entries belong to either category id. To return those that belong to both then use the & symbol instead of the | character.

Link to the docs read it :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.