Search code examples
orchardcmstaxonomy

Orchard get Taxonomy term name of a particular Content Item


Is it possible to get the taxonomy term name of a content item in orchard? I use the Designer tools module and i cannot find it in there.


Solution

  • Solved, 'Category' is the name of my taxonomy:

       @{
        var categoryName = "";
        foreach (dynamic term in Model.ContentItem.BlogPost.Category.Terms.Value)
        {
            categoryName = term.Name;
        }
    }