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)
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 :)

| improve this answer | |
  • Thank you for the speed in your response ... i realised that it is a bug as it does not work after many tries – Kostas Romporas Apr 10 '17 at 14:59
  • I confirm that it is a bug as category="x&y" does not produce the expected results – Kostas Romporas Apr 10 '17 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 :)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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