Skip to content

Instantly share code, notes, and snippets.

@sleslie321
Last active January 4, 2016 19:59
Show Gist options
  • Save sleslie321/8670558 to your computer and use it in GitHub Desktop.
Save sleslie321/8670558 to your computer and use it in GitHub Desktop.
Umbraco - list of tags via Razor
@using umbraco.cms.businesslogic.Tags
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@{
var blogTags = Tag.GetTags("default").OrderByDescending(t => t.NodeCount);
}
<h4>Tags</h4>
<ul>
@foreach (var t in blogTags)
{
<li><a href='/tag?tag=@t.TagCaption' title='@t.TagCaption'>@t.TagCaption (@t.NodeCount)</a></li>
}
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment