Sitefinity Custom Module and MVC Widgets

Posted by Community Admin on 04-Aug-2018 15:33

Sitefinity Custom Module and MVC Widgets

All Replies

Posted by Community Admin on 29-Oct-2013 00:00

I created a Sitefinity Custom Module (new project) and I was wondering if it was possible to add MVC widget into the module? I know it is possible to add Webforms Widgets, but I have not succeeded for MVC Widgets.

Posted by Community Admin on 29-Oct-2013 00:00

From the little i know(not alot) i believe you can only move the controllers and models outside of the sitefinitywebapp to another due to siteifnity routing reasons.

Posted by Community Admin on 01-Nov-2013 00:00

Hi,

 Mvc widgets can`t be coming from an assembly that is different from the assembly of the sitefinity site. Sitefinity requires the controller class and the view to be present locally in the site, the model class can be compiled into an assembly tough. This is because of the way sitefinity which is originally web forms CMS support Mvc controllers to be registered as widgets.

Regards,
Stanislav Velikov
Telerik
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 23-Nov-2013 00:00

It's definitely possible to put the Controller & the Model in a separate assembly, but there doesn't seem to be any work-around to get the view in the DLL also.  It appears that the view has to be physically present.

Here's how to register the control in the toolbox:

<add enabled="True" type="Telerik.Sitefinity.Mvc.Proxy.MvcControllerProxy" controllerType="NameSpace.MVCWidgets.Controllers.BlogPostArchiveController" title="BlogPostArchive" ControllerName="NameSpace.MVCWidgets.Controllers.BlogPostArchiveController" visibilityMode="None" name="BlogPostArchive" />

Posted by Community Admin on 16-Nov-2015 00:00

I'm not entirely sure about the widgets inside modules part, but it seems MVC widgets and their views can be created in a separate project according to this article: docs.sitefinity.com/feather-create-widgets

?

Posted by Community Admin on 19-Nov-2015 00:00

Hello,

Yes this is possible, my last reply on this topic was from 2013 when Sitefintiy MVC was not supporting this.
Now with Sitefinity Feather this is possible based on the documentation you pointed.

Regards,
Stanislav Velikov
Telerik

 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

Posted by Community Admin on 24-Nov-2015 00:00

Is this only for Feather (I.E. MVC or can we create regular ascx widgets in separate assemblies too?)

Posted by Community Admin on 27-Nov-2015 00:00

Hi,

For webforms and .ascx this is available. Refer to this sample in Sitefinity SDK the date picker project contains a control that is stored in external assembly.

Regards,
Stanislav Velikov
Telerik

 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

This thread is closed