Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hey.
I'm trying to get all pages that are tagged with a specific tag, ex. "apple", "samsung"
I'm using this to list all the tags:
@{ var tagList = Umbraco.TagQuery.GetAllTags("news").OrderBy(t => t.Text); <ul> @foreach(var tag in tagList) { <li>@tag.Text</li> } </ul> }
but I would like to get all pages with there url and name listet.
Hope anyone can help, thanks
// Thomas
Hi Thomas
You can get all pages with this code:
var nodesTags = Umbraco.TagQuery.GetContentByTag("testTag", "tagGroup");
Example:
@{ var nodesTags = Umbraco.TagQuery.GetContentByTag("testTag", "news"); <ul> @foreach (var node in nodesTags) { <li><a href="@node.Url">@node.Name</a></li> } </ul> }
Brilliant! Thanks Alex. Saved my day ! :D
You are welcome, Thomas, have a great rest of the day!
Thanks you, you too :)
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Get all pages with a tag ex. "apple" or "Samsung"
Hey.
I'm trying to get all pages that are tagged with a specific tag, ex. "apple", "samsung"
I'm using this to list all the tags:
but I would like to get all pages with there url and name listet.
Hope anyone can help, thanks
// Thomas
Hi Thomas
You can get all pages with this code:
Example:
Brilliant! Thanks Alex. Saved my day ! :D
You are welcome, Thomas, have a great rest of the day!
Thanks you, you too :)
is working on a reply...