There doesn't seem to be a lot of documentation for this library.. This doesn't seem to accept a comma delimited list of tags as the name would seem to indicate.. I'm trying to get a list of related posts based on a tag list.. For instance, a post might have 3 tags (tag1, tag2, tag3) and I want to show all other posts that have one of those tags. Is there a way to do this. It seems that I could loop over the tags and call getContentsWithTags for each tag however I'm not sure how I'd deal with duplicates? Any help would be appreciated.
What kind of result are you getting from the method? Nothing? An Error?
Just looked at the source, and i _should_ support a comma separated list. However, it looks like it is performance intensive, since it get a whole lot of documents directly from the database, so if you expect a lot of traffic you might want to add some caching, or build some other way of getting the data.
tagsLib:getContentsWithTags('tag')
There doesn't seem to be a lot of documentation for this library.. This doesn't seem to accept a comma delimited list of tags as the name would seem to indicate.. I'm trying to get a list of related posts based on a tag list.. For instance, a post might have 3 tags (tag1, tag2, tag3) and I want to show all other posts that have one of those tags. Is there a way to do this. It seems that I could loop over the tags and call getContentsWithTags for each tag however I'm not sure how I'd deal with duplicates? Any help would be appreciated.
What kind of result are you getting from the method? Nothing? An Error?
Just looked at the source, and i _should_ support a comma separated list. However, it looks like it is performance intensive, since it get a whole lot of documents directly from the database, so if you expect a lot of traffic you might want to add some caching, or build some other way of getting the data.
Look here for a sample of how to use it:
http://blog4umbraco.codeplex.com/SourceControl/changeset/view/54177#916036
You could probably do it directly in xslt if you wanted, just by comparing strings.
Cool, that's what I needed and worked great. I customized my implementation with new xlts and I guess I just overlooked that one! Appreciate it.
is working on a reply...