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

77 views Asked by At

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.

2

There are 2 answers

0
Marek Musielak On BEST ANSWER

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"/>
0
Ian Graham On

I don't think it does this out of the box and by default it get's all the tags.

As WeBlog is open source and on Github you could fork your own version and modify it to your requirements.

Here's the part where the Tags are rendered in the side bar:

https://github.com/WeTeam/WeBlog/blob/3da28ffd1431bdec27fa0ef2775701807015c60f/Website/layouts/WeBlog/Sidebar/TagCloud.ascx.cs