Sub Categories Widget

Posted by Community Admin on 04-Aug-2018 16:20

Sub Categories Widget

All Replies

Posted by Community Admin on 26-Nov-2014 00:00

Hi,

I am trying to create a custom widget / modify the Categories widget so that it only show children under a selected parent category. I have stumbled across this blog post which sounds like it will do exactly what I want.

http://www.sitefinity.com/blogs/jen-pelevas-blog/2013/05/10/how-to-create-a-categories-control-that-lists-sub-categories-in-sitefinity-cms

I have created the class in my project but I am struggling to see how I deploy it in Sitefinity. Do I need to create a Custom widget and link to this class or do I need to modify something in the admin section? 

Any help would be greatly appreciated.

Posted by Community Admin on 26-Nov-2014 00:00

If it inherits from TaxonomyControl then just open your backend advacned settings toolbox node, look for the existing tag\category toolbox items.  Just copy down all the fields there, and then make a new node (in the UI), paste in all the fields EXCEPT for the type, the new type will be the "namespace.class, assembly" of your version.

 No recycle nessesary, reload the page editor and it should be there

(This all assumes the "code" is live...)

Posted by Community Admin on 05-Aug-2015 00:00

An old post but in case anyone is wondering. the inheritance seems to work a bit differently now and didn't work for me like it did for Steve. I didn't need to enter the Type as the new assembly but instead substituted the Control CLR (very first line of the form).

If you set the build action as "compile" for your class you need to use the namespace used in your class. Based on that article it would be: SitefinityWebApp.TemplateMapping.CustomTaxonomyControl, SitefinityWebApp -- Remember that even though it seems verbose to always include the assembly after the CLR.

See attached screenshot.

This thread is closed