All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Create a list of date ranges to filter by.

Dave 17 Jul 2013 10:41 question, complete

Hi Low,

I would like to make a list with date ranges such as today, this week, next week and this month.
Im able to output the date ranges like this so far:


{exp:low_events:entries channel="item" date="now;+7 days""}
<div class="event">
<h2><a href="{title_permalink='main-templates/item-single-post'}">{title}</a></h2>
</div>
{/exp:low_events:entries}


Showing all the events for this week. But I would like to have a filter list and when the date range is clicked upon the result will be shown. Somehow like Low-Seacrh would do.. Do you have solution for me??

Thanks Again, for your time..

Dave

Replies

  1. Low 17 Jul 2013 10:51

    Out of the box, you can use Dynamic Parameters, in this case, the date="" parameter. Downside to this is that you lose pagination and shareable/bookmarkable results.

    Another solution is, as you guessed, using Low Search. As an example, here's a site that uses Low Events and Low Search in conjunction.

  2. Dave 17 Jul 2013 12:25

    Ok, so I want to try Low-Search for this..

    Is it possible to use the filter tag, you gave me an example of this by listing a radio_button channel field. Is it possible to do it like this with Low_events date field/paramater?

    {exp:low_search:filters query="{segment_3}" result_page="main-templates/result-filter"}
    {exp:low_options:duur parse="inward"}

    <li>
    {options}
    <a href="{low_search:url search:duur="={option:value}"}">
    {option:label}
    </a>
    {/options}
    </li>

    {/exp:low_options:duur}
    </ul>
    {/exp:low_search:filters}


    What should the code look like if this was possible?

    Thank you, again..

  3. Low 17 Jul 2013 12:30

    You should be able to do it using something like this (inside the Filters tag pair):

    {low_search:url low_events:date="now;+7 days"}

  4. Dave 17 Jul 2013 13:42

    Thanks Low,

    I created a link around that and that is exactly what I wanted..

    Dave