BLOG! Show and hide tags in tag cloud based on language selected

Dcode warner asked on September 2, 2020 17:15

Hello. I have a blog that has a tag cloud web part. My blog is also in different languages, English, Chinees, Korean etc. The issue I'm having is that if I remove a tag from a blog post in English. It still shows in the tag cloud because the blog post has the same tag in Korean.

So clicking on the tag on the English side shows nothing. While clicking on the tag in Korean shows the korean blog post.

Is there a way to only show the tag when if is avaialbe in the current Language selected. Do I need to make this a repeater?

Recent Answers

Liam Goldfinch answered on September 2, 2020 20:57


On the Tag Cloud webpart, try ticking Use page filter to be enabled, and in the Culture code field open the macro editor and use the following macro:

{% DocumentContext.CurrentPageInfo.DocumentCulture #%}

I've tested this on the Dancing Goat sample site and it hides tags from other cultures.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.