Change Page Title in MVC Widget with Template in Hybrid Mode - General Discussions - General Discussions - Progress Community
 General Discussions

Change Page Title in MVC Widget with Template in Hybrid Mode

  • Change Page Title in MVC Widget with Template in Hybrid Mode
  • Is it possible to dynamically change a page title from either the Controller or the View when using an MVC Control on Page that is Templated in hybrid mode? I don't have a ViewBag to bubble up to. 
  • Hi Joseph,

    If you set Title in the controller's view bag Sitefinity will pick this up and set the Title of the page:

    this.ViewBag.Title = "Some title";

    Greetings,
    Radoslav Georgiev
    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 does not appear to be working for us in Hybrid mode on Sitefinity 6.1. Has something changed?
  • Following doesn't work.

    this.ViewBag.Title = "Some title";

    Any solution?

  • Hi all,

    I have tested the proposed solution by Radoslav and it works fine. Here is a short video of the working widget. Please, specify what version of Sitefinity you are using. In order to use the code in the controller you should have a reference to Microsoft.CSharp.
    Hope this helps.

    Regards,
    Nikola Zagorchev
    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