0

Trying to build a simple event filtering system with categories (Seg2Cat) and dates. This is my current approach (which does not work):

{exp:low_events:entries channel="events_submitted|events_internal" category="{last_segment_category_id}" date="{last_segment}" dynamic="no" parse="inward"} 

I did manually place a date in the parameter which also did not work.

{exp:low_events:entries channel="events_submitted|events_internal" category="{last_segment_category_id}" date="2014-06" dynamic="no" parse="inward"}

Ideally, I'd like to be able to achieve these results with just the one tag:

Is it possible for them to play together? Or should I rethink the approach? Perhaps use Low Search?

1 Answer 1

2

For the first URL, you won't get a valid category ID, as {last_segment_category_id} points to the last segment: the date. You'd need to get creative with simple conditionals and preload replace vars. Something like this:

{if segment_4 != ''}
  {preload_replace:pre_category="{segment_3_category_id}"}
{/if}

{preload_replace:pre_category="{last_segment_category_id}"}

{exp:low_events:entries
  category="{pre_category}"
  date="{last_segment}"
  ...
}

Note that this approach only works when using simple conditionals for the preload replace vars.

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.