More in this section
Forums / Developing with Sitefinity / MVC Widget on master page disapears when other view is displayed

MVC Widget on master page disapears when other view is displayed

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
3 posts, 0 answered
  1. Bobby Ross
    Bobby Ross avatar
    14 posts
    02 Nov 2004
    03 Jul 2013
    Link to this post
    I am using MVC to create widgets, but have a confusing situation going on.

    I created a custom masterpage with a placeholder in the top right for a login control.  I then created a custom login control using MVC which is placed on the master page template within the sitefinity backend designer.

    This all works as expected when creating pages using the master page template, but if I add an MVC widget to the body of the page which links to another view the login widget placed on the master template disappears when the view is changed for example /reports to /reports/detail/1.

    For example:
    1. Create a master page .
    2. On the master add 2 place holders (one for a custom MVC login widget, and another for body content).
    3. Add the master in Sitefinity as a page template.
    4. Edit the page template in sitefinity  for the master and add an MVC widget to the login placeholder so all pages created from the template will display it by default.
    5. Create a new page using that template and add another widget the body placeholder that has links to another view, for example edit links.
    6. When you navigate to the page everything appears fine, but if you click edit the login widget disappears.

    I assume this has something to do with the fact that when the body MVC widget changes to an edit or detail view, the login widget must also have a view with the same route.  Since it doesn't it does not display.  Is there a way to make sure that other widgets on the same page play well together when changing views.

  2. Axe
    Axe avatar
    16 posts
    11 Feb 2007
    07 Jul 2013
    Link to this post
    I have come across the same problem.
    This is how to reproduce problem: (basically same as above)
    1. Place an MVC widget on page template
    2. Create a page and place a master/detail MVC widget on the page
    3. Navigate to page and everything works
    4. Click link that points to detail and when page loads all the MVC widgets from page template disappear
    Everything works fine if  you only use the Index() actions for all MVC widgets. As soon as you use another action the other index actions are not hit.

    Is there something we can do to get this to work?
    I do remember in on the the MVC webinars there was mention of ensuring we use different action names as there may be problems. Not sure if this issues is related though.
  3. Stefani Tacheva
    Stefani Tacheva avatar
    718 posts
    31 May 2017
    08 Jul 2013
    Link to this post

    I would suggest you to review the following blog post where you will find useful information:

    Stefani Tacheva
    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
3 posts, 0 answered