Hi again,
I've created a method in my page class that outputs a list of blog publication years for use in my navigation:
public function getBlogYears()
{
$archivewidget = new ArchiveWidget();
$archivewidget->DisplayMode = 'year';
return $archivewidget->Dates();
}
In template:
<ul class="nav">
<% control BlogYears %>
<li>
<a href="$Link" class="$LinkingMode">$Date.Year</a>
</li>
<% end_control %>
</ul>
It's outputting the dates and linking them perfectly.
I didn't expect $LinkingMode to work. How would I get that functionality in this case, so the selected year can be highlighted?