controlled doesn't see view MVC widget

Posted by Community Admin on 04-Aug-2018 01:36

controlled doesn't see view MVC widget

All Replies

Posted by Community Admin on 03-May-2013 00:00

Hello,

I'm trying to create MVC widget by following this guide
I created model-view-controller classes in the MVC folder. But, some reason Controller’s Index action method does not see associated Index View (please see attached pics).

If I implement View using ReSharper, View gets created in the folder structure that is OUTSIDE of MVC folder: WebApp\Views\Navigation\Index.cshtml. How can I make my controller to recognize Views in MVC folder?

I'm testing on clean 5.4 installation.

Posted by Community Admin on 03-May-2013 00:00

Hi Denis,

I checked your code and your folder structure and they seem OK. I tried to reproduce your issue, but the action finds the Index.cshtml view. I have attached my model, controller and a view. Could you please try it on your project and see if they are OK. I've put my MVC widget on a Sitefinity page and it behaves fine. Another option is to try to create a MVC widget with the Thunder visual studio extension. You can download Thunder from here. When you install Thunder, you can right click on the MVC folder in your project and then choose Add-> New Item... from the context menu. When the add new item window appears, you need to select the Sitefinity category on the right panel of the window and then choose the Sitefinity MVC Widget with Designer option. When you click "Add", it will generate an MVC widget automatically and you can check the generated code.  Feel free to write us if you have any more questions regarding the Sitefinity MVC implementation.


Kind regards,
Tosho Toshev
the Telerik team

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

This thread is closed