Tabbed content control

Posted by Community Admin on 04-Aug-2018 07:49

Tabbed content control

All Replies

Posted by Community Admin on 30-Apr-2014 00:00

Hi all.

I need to create a tabbed content control. The content panels would be HTML DIV tags, the tabs would be an HTML list and the control would be rendered by using Kendo UI or jQueryUI. There needs to be a flexible number of tabs but the last tab will contain product data and the content of that tab will be supplied (rendered) by a compiled DLL control as it comes from a product database.

 The first tabs can be created by the Sitefinity content editor.

I am trying to create this control as a compiled custom (DLL) control, not a .ASCX widget because I don't know how else to use the Sitefinity content editor to generate the content. I have been trying for days to create this control but I keep having problems:

1) jQuery / Kendo work in edit mode but not in preview or frontend mode. I got around this by hard coding references to the those libaries in the control as I could get the ResourceFiles class to work programatically.

2) The control extends the ContentBlock class so that I can use the ContentEditor to create the first few content DIV tags. I don't want the standard Div wrapper rendered by the ContentBlock control, so I have overidden the 'Render' method on in that, I call the base class 'RenderContents' method. This work fine in edit mode and preview mode but does not render anything at all in front end mode.

I need to get this control working but don't know how to do it! Does anyone have any suggestions, examples or even working controls they can share to assist?

 Many thanks!

Ross.

Posted by Community Admin on 01-May-2014 00:00

I fixed this problem very simply by overriding the 'RenderBeginTag', 'RenderContents' and 'RenderEndTag' methods.

 Doing that allowed me to change the ContentBlock tags and mix system generated HTML in with the user generated HTML. Yay!

 Ross.

This thread is closed