Search code examples
sitecoreweblog

Is it possible to restrict the number of items show in WeBlog tag cloud within Sitecore?


I am using the WeBlog module in Sitecore 7.1. After years of blog posts, the tag cloud control now shows a huge list of all the tags which have ever been used in a post. Is it possible to restrict the number of tags which show or provide a minimum threshold for the number of times each tag needs to have been used?

I can't find any information in the documentation or within the Sitecore content editor, but I assume it must be a common problem.


Solution

  • From what I know there is no way of limiting the number of tags in the TagCloud sublayout out of the box.

    However you can create your own CustomTagManager class, inherit from Sitecore.Modules.WeBlog.Managers.TagManager and override the implementation of the GetAllTags() method to get only first N tags.

    When you have your CustomTagManager, just register it in WeBlog.config file instead of this line:

    <setting name="WeBlog.Implementation.TagManager" value="Sitecore.Modules.WeBlog.Managers.TagManager"/>