Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Get tag count for just current culture? View modes: 
User avatar
Member
Member
Boolean - 6/6/2013 1:57:23 PM
   
Get tag count for just current culture?
Hi

I'm using the kentico blog and displaying the document tags/categories underneath the post. Next to those I've added a little count of how many of those tags are being used, which is stored in the CMS_Tag table.

The problem I'm running into is that the count does not take cultures into account, so if I have the tag "TagA" applied to a multiple blog posts in en-US, en-CA and en-GB, it comes up as an aggregate of all those cultures. For example, given the following posts:

Blog post A (en-US) = "tagA"
Blog post B (en-US, en-CA) = "tagA"
Blog Post C (en-US, en-CA, en-GB) = "tagA"

Visiting "Blog Post C" in the en-GB culture shows a "tagA" count of 3, not 1.

Is there a way to see how many times a tag is being used in just the current culture? It was causing some confusion when the tag for en-US was being used 20+ times, but the en-GB was only being used once, so the tag count looked broken.

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 6/7/2013 8:29:35 AM
   
RE:Get tag count for just current culture?
Hi,

As you can see from the Database table for Tags, as each culture version has a specific document, you can simply decide how many counts it has at all. But you use API to get the default culture document and its Tag Count, but from my point this could be a little bit confusing.

Best regards,
Martin Danko

User avatar
Member
Member
Boolean - 6/7/2013 12:30:57 PM
   
RE:Get tag count for just current culture?
Oh cool, I didn't notice there was a DocumentTag table. I should be able to build a query from that.

Cheers!