Example #1
0
 public IEnumerable<ContentItem> GetTaggedItems(Tag tag)
 {
     return _tagFinder.QueryDetails<LinkProperty>()
         .Where(lp => lp.LinkedItem == tag)
         .ToList()
         .Select(lp => lp.EnclosingItem)
         .Distinct();
 }
Example #2
0
 public int GetReferenceCount(Tag tag)
 {
     return GetTaggedItems(tag).Count();
 }
Example #3
0
 public void AddTagToItem(Tag tag, ContentItem item)
 {
     PropertyCollection tags = item.GetDetailCollection("Tags", true);
     if (!tags.Contains(tag))
         tags.Add(tag);
 }