Calendar Template Conditional


Active Member
Hi there, quick question -

What would be the best way to use a conditional to display content based on an event field / custom field ?

Example - I have a event field titled 'show' - if the option is 'Yes' - content within this conditional will display. Else, it will display nothing.

I've tried dumping vars and searching around, and I understand the basic premise but I'm not quite sure how to get there.

Any help would be appreciated.


Staff member
You'll need to edit the field and pick the "Self placement" display location.

From there, you'll need to edit the template where you want the content to show and add this:

<xf:if is="{$event.custom_fields.fieldIdHere} == 'choiceValueForYesHere'">
    Your content here

If you want this to appear on the event view page, you'll want the nf_calendar_event_view template. Anywhere else, you'll need to make sure $event is available.