News Summary Filter by Date for Monthly Archives - please help?
Posted: Sat Jul 11, 2009 9:07 pm
I can't get this code in a news summary template to give me what I want...I'm calling it here:
http://www.runwashington.com/test/?news_by_month=03 with this:
===================================
News Summary template called 'datetest'
===================================
The smarty get is working...but the filter isn't. Client really wants the ability to browse articles by month.
Any help is sincerely appreciated!
Thank you, Lisa
http://www.runwashington.com/test/?news_by_month=03 with this:
Code: Select all
{news summarytemplate='datetest' number='10'}
News Summary template called 'datetest'
===================================
Code: Select all
{if $smarty.get.news_by_month}
{capture assign=news_by_month}{$smarty.get.news_by_month}{/capture}
{else}
{capture assign=news_by_month}01{/capture}
{/if}
<!-- News datetest (in Summary Template) -->
<div class="NewsSummary">
<b>{$news_by_month}</b>
{foreach from=$items item=entry}
{if $entry->postdate|date_format:'%m' == $news_by_month|date_format:'%m'}
<p><span class="postdate">{$entry->formatpostdate|date_format:"%m/%d/%y"}</span>
{$entry->titlelink}<br /><i>{eval var=$entry->summary|truncate:100}</i></p>
{/if}
{/foreach}
</div>
Any help is sincerely appreciated!
Thank you, Lisa