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

Support archive

Using next_date tag as a parameter in an entries tag

Kevin Beick 30 Oct 2017 22:59 question, complete

I'm trying to pull a week's events given an arbitrary start date - the tricky part being I want to start the search the day after the given date. I've tried the following code, but it's not parsing correctly. It seems to be starting from TODAY which I take to mean it doesn't like my code. Is this doable?

{exp:low_events:entries
channel="events"
date="{exp:low_events:next_date date='{segment_3}-{segment_4}-{segment_5}' unit='day' format='%Y-%m-%j'};+1 week"
unit="custom"
}

Eg: if {segment_3}-{segment_4}-{segment_5} == 2017-10-19, then I want this:
{exp:low_events:entries
channel="events"
date="2017-10-20;+1 week"
unit="custom"
}

Replies

  1. Low 31 Oct 2017 10:33

    Using a tag for another tag's parameter value is not recommended nor supported. You'll need to have the date ready as a variable prior to feeding it to the start date.

    For a rather more complex calculation like this, you'd probably have to use PHP on Input for that template to calculate the date using PHP.

  2. Kevin Beick 31 Oct 2017 23:36

    I thought that was the case. Thanks for confirming!