Adding A Subtitle to an Event Calendar

Hello,

We have an unusual request from the owners of one Group calendar to add a subtitle under the Group Calendar title that will say something like this:

All Indiana University events, programs, groups, activities, educational, cultural, and historical observances are open to all members of the Indiana University community.

For context, we have close to 550 group calendars and do not think we should add it to all of them. The request is for this group:

https://events.iu.edu/southeast/

Can this be done without changing the one shared template that we have?

Thanks,

Akbar

Hello Akbar,

I don’t know what is possible specifically in LW Calendar, but perhaps there’s a way to only show an additional element if in the correct group. Some possibilities:

  • In the shared template, find how to access the current page’s group_id or gid. If the gid is 15, then add this extra HTML.

    • Alternative: read and compare the page url.
  • In the shared template, add the blurb as an hidden element. Then use CSS to display it on the Southeast calendar pages.

    • body.group_iu_southeast_calendar div.message { display: block; }

    • Alternative: use Javascript livewhale to show/hide the element.

Then, if any other campus/group needs the same message, you can add additional positive conditions, or in the end quickly switch the logic to show on all if needed.

Hope that helps.

Thanks,
Nick

Possible you could provide an example how to check for gid in template?

Never mind. This works:

	<xphp content="true">
	   <if var="group_gid" value="15"/>
		 <content>
			<p style="background-color: #f8f9fa;">All Indiana University events, programs, groups, activities, educational, cultural, and historical observances are open to all members of the Indiana University community.</p>
		 </content>
	</xphp>	

Thanks.

1 Like