Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Display articles that share a tag View modes: 
User avatar
Member
Member
christopher.lacefield-whirlpool - 3/15/2013 11:13:05 PM
   
Display articles that share a tag
I'm trying to use the news list webpart to display only documents that have a specific tag. I've tried setting the WHERE clause to tagid=tagid# but that doesn't seem to work.

Any suggestions on what I can do differently?

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 3/19/2013 6:27:41 AM
   
RE:Display articles that share a tag
Hello Christopher,

The first thing to set is WHERE condition, I have tried something like this:
DocumentID IN (SELECT DocumentID FROM CMS_DocumentTag WHERE TagID IN (SELECT TagID FROM CMS_Tag WHERE TagName = 'my_tag'))

and there is also necessary to add a Tag Fields into Columns, so in my case related to news, it is:
NewsTeaser, NewsTitle, NewsSummary, NewsText, NewsReleaseDate, NodeAliasPath, DocumentURLPath, SiteName, NodeOwner, NodeAlias, Content, DocumentTags, DocumentID

I hope this example will help you.

Best regards,
Martin Danko


User avatar
Member
Member
christopher.lacefield-whirlpool - 3/20/2013 2:15:05 PM
   
RE:Display articles that share a tag
Martin,

Thanks! I was able to set the WHERE condition without any problem. I'm assuming that my Tag Field had already been set into Columns since I didn't have to do that.

But in either case it worked beautifully! Thank you.