1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Get Images in Library By Tag

Get Images in Library By Tag

2 posts, 0 answered
  1. Roberto
    Roberto avatar
    146 posts
    Registered:
    08 Feb 2008
    04 Mar 2010
    Link to this post
    Hi All,

    I am creating a custom gallery control and have a couple of questions that i cant seem to find the answers for:

    1) How can i retrieve images in a specific library by tag? 
    2) How can i retrieve the tags associated with a particular image?

    Any help would be greatly appreciated.

    Thanks,

    Rob
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    04 Mar 2010
    Link to this post
    Hi Roberto Modica,

    Images are IContent objects. There is an Interface ITag which you can use to get all objects associated with a given tag

    •  TaggedContent- IList of ITaggedContent  objects that represents a lookup table between ITag and IContent
    • use GetTags method of ContentManager class. The method has five overloads. In the first of then you can pass the content ID to get IList of ITag objects associated with a given content item.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
2 posts, 0 answered