Skip to content

Instantly share code, notes, and snippets.

@makbeta
Created January 17, 2013 21:55
Show Gist options
  • Save makbeta/4560175 to your computer and use it in GitHub Desktop.
Save makbeta/4560175 to your computer and use it in GitHub Desktop.
Luminate CMS: dynamic list of monthly archives
<t:if test="length > 0">
<t:set id="lastdate" value="15" />
<ul>
<t:list>
<t:if test="month(date) != lastdate">
<t:set id="fromMonth" value="month(date)+1" />
<t:set id="toMonth" value="month(date)+2" />
<t:set id="fromYear" value="year(date)" />
<t:if test="fromMonth == 12">
<t:set id="toYear" value="year(date)+1" />
</t:if>
<t:else>
<t:set id="toYear" value="year(date)" />
</t:else>
<li><a href="/blog/archive.html?dateType=date&startDate=&endDate="><t:value id="date" format="MMMMMMMMM yyyy" /></a></li>
</t:if>
<t:set id="lastdate" value="month(date)" />
</t:list>
</ul>
</t:if>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment