I'm using Mura CMS 7.1, which uses ColdFusion. On a page template I have some markup and am including a template file that has code for displaying calendar events from an outside source. When there are no events, I'm currently displaying a message as such. Instead however, I'd like to hide this entire section on the page template itself. Problem is I need to pass some sort of value from the include file back to the page template so I can set inline CSS to either display block/none for this section, and I'm not sure how to do this. My page template code is:
<section class="collegeEvents" style="display:">
<div class="collegeEvents__container wrapper-1170MaxWidth">
<h2 class="collegeEvents__heading">What's coming up?</h2>
<cfinclude template="inc/homeEvents.cfm" />
</div>
</section>
And the calendar code is all inside of the 'homeEvents.cfm' file. I need to be able to alter that inline css 'display' property with a value that I set in 'homeEvents.cfm'. How would I go about doing this so that the value is accessible from the page template?
This is a formatted comment.
I know that variables in the calling page are available in the included page. This leads me to believe that variables in the included page are available to the calling page. Here is a simple test of that theory.
CallingPage.cfm
IncludedPage.cfm
Browse CallingPage.cfm and see what happens. If you get an error for an undefined variable, there is always to good old session scope.