How to GetTags - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

How to GetTags

  • How to GetTags
  • In the 3.0 forum there was a note from the forum admin:

    "Tags are created per provider and you cannot have tags for a single library. Tags are associated with a content items - IContent object and not with the ILibrary object. You can get all tags for a given item by using GetTags(Guid contentId) - Get all Tags for a specific content item by passing its ID"

    How can this be accomplished in 4.x?

    Thanks!
  • Hello Caedmon,

    Please take a look at this post.

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  • Yes, that's perfect for pulling all content items related to a tag.  What I need to do is pull all tags related to a content item.  An event to be specific.  

    So, event 1 has tags (1, 2, 3, 4) associated with it.  I'm not seeing how to pull this from the SF framework in a User Control.

    Thanks for all that you do!
  • Hello Caedmon,

    You can use GetValue extension method


    using Telerik.Sitefinity.Model;

    ..
     ..

    var news = App.WorkWith().NewsItems().Get().First();
    var tags = news.GetValue("Tags");

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  • Thanks very much!

    What types of content are the Guid's that are returned in the TrackedList<Guid>?

    Thanks!
  • Got it:

    var taxon = manager.GetTaxa<FlatTaxon>().Where(t => t.Id == id).FirstOrDefault();


    Thanks for your help!