Skip to content

Instantly share code, notes, and snippets.

@claushingebjerg
Last active August 29, 2015 14:23
Show Gist options
  • Select an option

  • Save claushingebjerg/500f8068cd9118407120 to your computer and use it in GitHub Desktop.

Select an option

Save claushingebjerg/500f8068cd9118407120 to your computer and use it in GitHub Desktop.
List all nodes with a tag from querystring, partial view
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@{
string tagToFind = Request.QueryString["tag"];
var allNodesWithTags = Umbraco.TagQuery.GetContentByTag(tagToFind);
}
@foreach (var node in allNodesWithTags)
{
<a href="@node.Url">@node.Name</a><br />
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment