modxcms / Archivist

Archive-based navigation for Resources.
https://modx.com/extras/package/archivist
2 stars 9 forks source link

Feature Request: Set active class for <li> #3

Open 4ntz opened 10 years ago

4ntz commented 10 years ago

Would be nice to be able to set a active class like you can do with Wayfinder. For example: &activeCls=´active´ renders to < li class="active" > Then one could style the active Link.

4ntz commented 9 years ago

Something like this works:

[[+arc_year:is=`[[+year]]`:then=`active`? &dateFormat=`%Y`]]

So my &tpl Chunk looks like this now:

<li class="[[+cls]] [[+arc_year:is=`[[+year]]`:then=`active`? &dateFormat=`%Y`]]">
<a href="[[+url]]" title="[[+date]]">[[+date]] ([[+count]])</a>
</li>