MVC widgets not registering in the Toolbox
Hi all,
I've found an issue with MVC widgets. After creating a widget, it's not registered in the Toolbox.
Steps te reproduce:
- Create a new SF 5.1 project.
- Edit in VisualStudio.
- Rename the project and the namespace to anything you like.
- Build.
- Run in VisualStudio, create the database, etc etc.
- Stop the project.
- Add a new MVC view and controller. (or even use Thunder to create a default helloworld one for you.)
- Build and run the project.
- Try to add your new widget and you'll find that it isn't there even though you've declared it as a ControllerToolboxItem.
The widgets do register only if you leave the original 'SitefinityWebApp' as it is.
By the way. If you rename your project, because you don't want to end up with 30 customer assemblies that are all named 'SitefinityWebApp.dll', Thunder does not pay any attention to that. New MVC widgets you add with Thunder are placed in the original SitefinityWebApp namespace even though it's completely gone.
Dear Erik
Markus,
Same issue here, everytime when i setup a new sitefinity project, i change the default namespace "SitefinityWebApp" to something meaningful...
Problem if you do so, the MVC Widget will not appear in the defined section, neither the section appears.
@sitefinity : is there another way to register widgets? like registering ASP.NET User Controls directly in the toolbox.config
I see it's not just me.
I'll just register a support ticket then.
Hi guys,
We have identified the problem and will fix it. In the meantime, you can register your MVC widgets manually by customizing the following line to correspond to your project and adding it to the ToolboxesConfig.config file found in the App_Data/Configurations folder:
<
add
enabled
=
"True"
type
=
"Telerik.Sitefinity.Mvc.Proxy.MvcControllerProxy"
controllerType
=
"SitefinityWebApp.Mvc.Controllers.MvcWidget1Controller"
title
=
"MvcWidget1"
ControllerName
=
"SitefinityWebApp.Mvc.Controllers.MvcWidget1Controller"
visibilityMode
=
"None"
name
=
"MvcWidget1"
/>
i want to import MVC Views from external mvc c# project . Controllers and datamodels are encapsulated in Dlls.
I have to import thats dlls in sitefinity proyect and copy and paste views in "shared" folder.
Then i can´t add "[ControllerToolboxItem(" directive because are encapsulated.
How can i register MVC widget in sitefinty toolbar
Regards,
Jose A.
Hello,
Currently this is not supported. You can try the registration method I shared below but I cannot guarantee that it will work.
Regards,Thank you, that solved my problem after 2 hrs trying desperately
Fixed?
Yea its fixed for me