I’m building a community site with 6 weblogs and a calendar weblog. To make anticipated changes in the standard design easier down the road, I’m using global templates for standard things like page_header, navigation, footer and the sidebar navigation. It’s working fine except for a quirk with the calendar weblog.
I’d like to post recent entries f or each weblog in the sidebar. Again, this is working except, of course, for the calendar which doesn’t display future entries in the sidebar. Adding show future entries didn’t work, so I decided to simply list the recent entries from the general community weblog which requires and {if} statement that would set the weblog identity. Alas, this isn’t working. Here’s the standard code:
. . .
<h2 class="sidetitle">Most recent entries</h2>
<ul>
{exp:weblog:entries orderby="date" sort="desc" limit="15" weblog="{embed:weblog}" dynamic="off" disable="pagination|custom_fields|categories|member_data|trackbacks"}
<li><a href="http://{title_permalink={embed:template_group}/index}">{title}</a></li>
{/exp:weblog:entries}
</ul>
.
.
.Here’s the test code I tried:
<ul>
{if {embed:weblog} == "calendar"}
<li>WEBLOG IS ({embed:weblog})CALENDAR</LI></UL>
{if:else}
<LI CLASS="DATE"> ({embed:weblog}) not calendar </li>
{/if}
</ul>For some reason, even when the weblog is the “calendar” weblog, it always defaults to the {if:else} option.
Here’s the site URL: http://drycreekcommunity.org/index.php/calendar/
Any ideas of a quick solution and why the comparison is always returning FALSE?
Thanks.