More in this section

Forums / Developing with Sitefinity / controlled doesn't see view MVC widget

controlled doesn't see view MVC widget

2 posts, 0 answered
  1. Denis
    Denis avatar
    105 posts
    27 Feb 2009
    03 May 2013
    Link to this post

    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.
  2. Tosho Toshev
    Tosho Toshev avatar
    8 posts
    15 May 2014
    03 May 2013
    Link to this post
    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
2 posts, 0 answered