Having an issue with the "Tags" datatype in Umbraco. I am using the GetNodesWithTags method to return all the nodes with the relevant tags. That's great. However I have multiple Tags datatypes which sometimes have the same tags.
What I ideally want is some sort of test to check the group of tags property on the document type. Is there anyway to do this. See code:
var matchingNodes = Tag.GetNodesWithTags(searchFor).ToList();
<ul>
@foreach (var node in matchingNodes)
{
dynamic dn = new DynamicNode(node.Id);
if(dn.Tags.Group == "TDNewsEventsTags") // This what I would ideally want to work. However .Tags returns a string so it doesn't work
How to test the tag group on a content node
Having an issue with the "Tags" datatype in Umbraco. I am using the GetNodesWithTags method to return all the nodes with the relevant tags. That's great. However I have multiple Tags datatypes which sometimes have the same tags.
What I ideally want is some sort of test to check the group of tags property on the document type. Is there anyway to do this. See code:
var matchingNodes = Tag.GetNodesWithTags(searchFor).ToList();
<ul>
@foreach (var node in matchingNodes)
{
dynamic dn = new DynamicNode(node.Id);
if(dn.Tags.Group == "TDNewsEventsTags") // This what I would ideally want to work. However .Tags returns a string so it doesn't work
{
<li><a href="@dn.Url">@dn.Name</a></li>
}
}
</ul>
Any help would be greatly appreciated :)
Jacob
is working on a reply...