Skip to main content
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
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';
<% control BlogYears %>
<a href="$Link" class="$LinkingMode">$Date.Year</a>
<% end_control %>
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?
i'm currently having the same issue with linkingmode. Have you found a solution?
No I abandoned this and used the vanilla archive widget. One thing that just sprung to mind is the use of InSection(). Not sure if it would work, but perhaps you could test InSection(Date.Year) or something like that?
Let me know if you have any success.