Skip to content

Instantly share code, notes, and snippets.

@1stevengrant
Last active August 29, 2015 14:08
Show Gist options
  • Save 1stevengrant/b2873978a4bace033f00 to your computer and use it in GitHub Desktop.
Save 1stevengrant/b2873978a4bace033f00 to your computer and use it in GitHub Desktop.
{!-- this generates the yearly nav --}
{exp:low_yearly_archives channel="news_article" start_month="1" status="not closed" sort="desc"}
{if year_count == 1}<ul>{/if}
<li>
<a href="{path=archive}{year}">{year}</a>
</li>
{if year_count == total_years}</ul>{/if}
{/exp:low_yearly_archives}
{!-- archive template -- }
{!-- this lists all the entries by year by passing {segment_2} into the year parameter --}
{exp:channel:entries
channel="news_article"
require_entry="yes"
dynamic="no"
year="{segment_2}"
{gv_param_disable_default}
}
<h1>{title} - {entry_date {gv_date_short}}</h1>
{/exp:channel:entries}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment