That's what I assumed, and it works if all the calendars are empty, but I have 3. As I say, I am a PHP novice (the last time I programmed, it was about 20 years ago in C, and before that in COBOL and FORTRAN; OOPLs are pretty foreign to me), and I simply can't see how to scope UpcomingEvents to the regional-events calendar only in the "if" statement.
<div id="Teaserbar" class="typography">
<div class="TeaserbarBox">
<h3>
Regional Events
</h3>
<% control UpcomingEvents(3,regional-events) %>
<ul id="Teaser2">
<b>$EventTitle</b>
<li><% control Event %>$Content.LimitWordCount(60)<% end_control %><br><a href="$Link"><% _t('MORE','more...') %></a></li>
</ul>
<% end_control %>
<div class="clear"></div>
</div>
<div class="sidebarBottom"></div>
<br>
...
</div>
works fine, but of course returns the header and an empty teaser box.
<div id="Teaserbar" class="typography">
<% if UpcomingEvents %>
<div class="TeaserbarBox">
<h3>
Regional Events
</h3>
<% control UpcomingEvents(3,regional-events) %>
<ul id="Teaser2">
<b>$EventTitle</b>
<li><% control Event %>$Content.LimitWordCount(60)<% end_control %><br><a href="$Link"><% _t('MORE','more...') %></a></li>
</ul>
<% end_control %>
<div class="clear"></div>
</div>
<div class="sidebarBottom"></div>
<br>
<% end_if %>
...
</div>
works but only clears the box if
all the calendars are a random calendar is empty.
<div id="Teaserbar" class="typography">
<% if UpcomingEvents(3,regional-events) %>
<div class="TeaserbarBox">
<h3>
Regional Events
</h3>
<% control UpcomingEvents(3,regional-events) %>
<ul id="Teaser2">
<b>$EventTitle</b>
<li><% control Event %>$Content.LimitWordCount(60)<% end_control %><br><a href="$Link"><% _t('MORE','more...') %></a></li>
</ul>
<% end_control %>
<div class="clear"></div>
</div>
<div class="sidebarBottom"></div>
<br>
<% end_if %>
...
</div>
Returns a parse error on the last line of HomePage.ss (unexpected "{").