1 YEAR AGO

Enabling the Multiple Category Selector in Web Parts

If there is one thing in Kentico that I repeatedly forget, it's the fact that the Multiple Category Selector form control by default only works in documents/pages. Fortunately, it is quite easy to tweak the control to be used within web parts/widgets. This post highlights the code to tweak and provides a nuget package for you to play with.

Before I start, please let me state that I would never recommend changing the Kentico source code. So please use below steps as reference for the things to adjust in a copy of the default Multiple categories selector form control.

First thing to do is enable the "Multiple categories selector" form control to be used in web parts:

Remember: the multiple categories selector is intended to be only used within page types and it won't work in other places if you don't make additional changes.

Next change the following code in "CMSModules\Content\FormControls\Categories\CategorySelector.ascx":