I’ve got it working, but I had to use PHP to make it happen. (Thanks to Mark in this thread for the boost.) Yikes, that was a bear. Still, it would be nice to have show_only_expired as a weblog (or channel) parameter in EE2.0! Hint!
Just thought I’d post back to help others in case they’re wondering the same. It’s a bit convoluted—and if anyone’s got a suggestion to make it cleaner, then great—but here’s what my code looks like:
{exp:weblog:entries weblog="{my_weblog}" show_future_entries="no" show_expired="yes" sort="asc" orderby="date" status="open" dynamic="off"}
<?php
$current_date = "{current_time format='%Y%m%d'}";
$expiry_date = "{expiration_date format='%Y%m%d'}";
if ($expiry_date >= $current_date)
{
echo '<h4>Current Exhibition</h4>
<p><ul id="sidebar_nav">';<br />
}</p>
<p>?><br />
{/exp:weblog:entries}</p>
<p>{exp:weblog:entries weblog="{my_weblog}" show_future_entries="no" show_expired="yes" sort="asc" orderby="date" status="open" dynamic="off"}<br />
<?php</p>
<p>$current_date = "{current_time format='%Y%m%d'}";<br />
$expiry_date = "{expiration_date format='%Y%m%d'}";<br />
if ($expiry_date >= $current_date)<br />
{<br />
echo '<li><span class="plus">+</span> <a href="http://{url_title_path=\\artists/details\\}">{title}</a></li>';<br />
}</p>
<p>?><br />
{/exp:weblog:entries}</p>
<p>{exp:weblog:entries weblog="{my_weblog}" show_future_entries="no" show_expired="yes" sort="asc" orderby="date" status="open" dynamic="off"}<br />
<?php</p>
<p>$current_date = "{current_time format='%Y%m%d'}";<br />
$expiry_date = "{expiration_date format='%Y%m%d'}";<br />
if ($expiry_date >= $current_date)<br />
{<br />
echo '</ul>';<br />
}</p>
<p>?><br />
{/exp:weblog:entries}</p>
<p>{exp:weblog:entries weblog="{my_weblog}" show_future_entries="no" show_expired="yes" sort="asc" orderby="date" status="open" dynamic="off"}<br />
<?php</p>
<p>$current_date = "{current_time format='%Y%m%d'}";<br />
$expiry_date = "{expiration_date format='%Y%m%d'}";<br />
if ($expiry_date < $current_date)<br />
{<br />
echo '</p><h4>Past Exhibitions</h4>
<p><ul id="sidebar_nav">';<br />
}</p>
<p>?><br />
{/exp:weblog:entries}</p>
<p>{exp:weblog:entries weblog="{my_weblog}" show_future_entries="no" show_expired="yes" sort="asc" orderby="date" status="open" dynamic="off"}<br />
<?php</p>
<p>$current_date = "{current_time format='%Y%m%d'}";<br />
$expiry_date = "{expiration_date format='%Y%m%d'}";<br />
if ($expiry_date < $current_date)<br />
{<br />
echo '<li><span class="plus">+</span> <a href="http://{url_title_path=\\artists/details\\}">{title}</a></li>';<br />
}</p>
<p>?><br />
{/exp:weblog:entries}</p>
<p>{exp:weblog:entries weblog="{my_weblog}" show_future_entries="no" show_expired="yes" sort="asc" orderby="date" status="open" dynamic="off"}<br />
<?php</p>
<p>$current_date = "{current_time format='%Y%m%d'}";<br />
$expiry_date = "{expiration_date format='%Y%m%d'}";<br />
if ($expiry_date < $current_date)<br />
{<br />
echo '</ul>';<br />
}</p>
<p>?><br />
{/exp:weblog:entries}
Explanation: If there aren’t any current exhibitions, then that ul block won’t show. Same for the past exhibitions block. My script assumes that something expiring today is still current. Tomorrow it won’t be. I used %Y%m%d instead of %U because the art gallery’s exhibitions would expire at the end of the day, not literally down to the minute of the entry.