Hi, one thing I need to be able to do with Ditto is set up links to "previous months" of blog entries, for example June 2010, May 2010 etc.
So far I have the following:
[!Ditto? &parents=`10` &depth=`0` &extenders=`dateFilter` &dateFilterSource=`params` &year=`2010` &month=`7` &tpl=`ditto.previousmonths` !]
The template is simply <p>[+month+][+year+]</p>.
Rather than linking to a page with a listing of the old blogs though, it’s just listing "2010" over and over within the page column where I placed the call. I’ve read a bit about using the &get parameter but haven’t found anywhere that explains how it can be used easily.
Ideally I’d like to have a new link appear when the current month becomes an "archive month" for example on August 1st it would be nice for "July 2010" to appear as a link in the Archives column, and when a user clicks on that link they get a listing of the blogs from that month.
Not sure if this can be done easily though? I’ve tried creating a form in the column as follows:
<form id="dateFilterForm" action="archives.html" method="get">
<select name="year" size="1">
<option value="""" selected="selected">- year-</option>
<option value="2010">2010</option>
</select>
<select name="month" size="1">
<option value="""" selected="selected">-- month --</option>
<option value="1">January</option>
<option value="2">February</option>
<option value="3">March</option>
<option value="4">April</option>
<option value="5">May</option>
<option value="6">June</option>
<option value="7">July</option>
<option value="8">August</option>
<option value="9">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12">December</option>
<input type="submit" name="Submit" value="Submit" />
</select>
</form>
And then in the archives.html page, call a snippet which contains the following:
<?php
$year = $_GET['year'];
$month = $_GET['month'];
?>
I echo-tested this and it outputted the year and month.
But I then tried this Ditto call below and it gave me "No documents found..."
[!Ditto? &parents=`10` &extenders=`dateFilter` &dateSource=`pkDate` &dateFormat=`%d %b %Y` ¶ms=`get` &year=`$year` &month=`$month` !]
However I know I have two blogs for July this year (which is what i search on in the form).
Anyone know why this is coming up empty?