I have a scenario where I need to access conditionals that work in the {exp:calendar:events} tag, eg this works:

    {title} {if event_never_ends}(never ends){/if}

but I need them to work within the {exp:calendar:cal} in order to maintain the chronological order. I though the {events} variable pair was supposed to allow the same conditionals/variable pairs, but this doesn't work (nor does the {rules} variable pair. Is there a special syntax or something I need to use to get something like this to work:

    {event_title} {if event_never_ends}(never ends){/if}

Thanks in advance!

  • What version of EE and Calendar are you using? Please provide exact version numbers. Have you also tried your above {exp:calendar:cal} code on a completely, absolutely blank EE template with nothing whatsoever on it besides the code (i.e. no CSS, JS, headers, footers, sidebars, and other 3rd-party plugins)? – Solspace May 6 '15 at 2:56
  • EE 2.9.3 and Calendar 1.8.12. – JustinXyn May 6 '15 at 15:05
  • And yes, I've tried a completely blank template - please see imagizer.imageshack.us/a/img661/9935/87MHK1.jpg – JustinXyn May 6 '15 at 15:20

It seems {if event_never_ends} doesn't parse in {exp:calendar:cal} but does in {exp:calendar:events}. Although it's not sure if this is a bug or a missing feature, we'll report this to our developers.

In the meantime, a workaround could be to use an embed and pass the event_id in {exp:calendar:cal} into a template using {exp:calendar:events}, in which you can use the {if event_never_ends} conditional. Keep in mind that if there are many events, this would also mean many embeds, and therefore possible decreased performance. Caching might help in those cases.

  • Hi, thanks for the comment, but the additional performance increase is what I'm trying to avoid. The same goes for the {rules} variable pair - this doesn't work in {exp:calendar:cal} either. – JustinXyn May 7 '15 at 18:16

I was not able to get the data out as expected using the {events} tag pair inside of the {exp:calendar:cal} tag pair either. Unfortunately, as Solspace already mentioned, I had to use an embed template and pass in the {event_id} to the embed and run {exp:calendar:events} in the embed.

I left a full example in my answer just now on my original question here. (It seems way too much info to paste in here. I will if need be though.)

Display a single Calendar Event that spans the current date

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.