Because there are already five possible subcategories for each Article, so I'd have to create five new subcategories every month.
I'm getting a bit closer to where I want to be; I've created a UDT which takes a string and returns it as a date:
Code: Select all
$input_date = $params['thismonth'];
echo date('d F Y',strtotime($input_date));
Which I can then input into my News template and filter by month:
Code: Select all
{capture assign='item_date'}{newsletter_date thismonth='June 2008'}{/capture}
{foreach from=$items item=entry}
{if $entry->postdate|date_format:'%m' == $item_date|date_format:'%m'}
<!-- Content -->
{/if}
{/foreach}
What I need now is a way to get the contents of a Content Block as a string and either pass it into the UDT instead of the parameter, or pass it into the News template as a parameter; neither of which I can work out how to do.
Also, with a lot of news stories on each page I feel that this could mean a lot of database queries. Could anyone suggest:
a) A way to pass the Content Block value to the UDT; or
b) A more elegant solution.