0

I am replacing an existing channel:entries tag pair which was displaying upcoming events, to now use the Solspace Calendar plugin (previous post here)

All I want to do is display the next 4 upcoming events.

(In order of occurrence - date/time.)
(Any event that has a category checkbox selected will not display.)
(The second/fourth div has a different style class)

{exp:calendar:events channel="event" category="not 15" sort="asc" date_range_end="12 months"}
        <div class="hevent">
            <div class="{switch='hedate1|hedate2'}">
                <div class="day">{calendar:event_start_date format="%l"}</div>
                <div class="date">{calendar:event_start_date format="%j"}</div>
                <div class="month">{calendar:event_start_date format="%M %Y"}</div>
            </div>
            <div class="hecont">
                <h4>{calendar:title}</h4>
                <p>{calendar:e_summary}</p>
            </div>
            <div class="hecont">
                <p><i>{calendar:event_start_date_timestamp_utc format="%g:%i%a"} to {calendar:event_end_date_timestamp_utc format="%g:%i%a"}</i>
                <br>{calendar:e_location}</p>
            </div>
        <a href="events/whats-happening#{url_title}" title="{title}"></a>
        </div>
{exp:calendar:events}

Using Calendar 2.3.2

It appears that 'event_limit' no longer works? Also unless I add "date_range_end="12 months", then NO results appear, even though the docs note that "If this parameter is not specified, then the default limit of 12 results will kick in".

What am I missing? ANY HELP is appreciated.

1 Answer 1

0

Perhaps you're viewing Calendar 1.x docs or sources, as the info you mention appears outdated. Have a look at the date_range_end parameter (default value is today, which is why you need to specify something like 12 months in a scenario like this).

As for limiting, use the limit parameter (limit="4"), as event_limit is from Calendar 1.x as well.

1
  • 1
    Thanks. When I searched the docs I getting redirected to content from the wrong version. I was also using/testing a field checkbox conditional (instead of the category checkbox) which was causing strange results but have fixed that now. Cheers.
    – ZEDG
    May 3, 2019 at 3:16

Your Answer

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

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