More in this section

Forums / Bugs & Issues / Nested Masterpage issue

Nested Masterpage issue

3 posts, 0 answered
  1. Kalvin MacLeod
    Kalvin MacLeod avatar
    19 posts
    15 Nov 2005
    27 Nov 2008
    Link to this post
    Maybe this is a bug or maybe I'm doing something stupid, but here's what's happening:

    I'm trying to create a nested masterpage that has the page title dynamically added to each page. So I have the following in my nested Masterpage:


        Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)  
            Dim CurrentCmsNode As Telerik.Cms.Web.CmsSiteMapNode = DirectCast(SiteMap.CurrentNode, Telerik.Cms.Web.CmsSiteMapNode)  
            If CurrentCmsNode IsNot Nothing Then  
                pageTitle.Text = CurrentCmsNode.GetCmsPage.Title  
                pageTitle.Text = "" 
            End If  
        End Sub 

    And then I have a simple literal in my aspx page. For some reason this code never get's executed
    (even tried response.write(CurrentCmsNode.GetCmsPage.Title) and nothing. Now the strange thing is that if I do the same thing in the parent Masterpage, everything works perfectly.

    Am I missing something with nested Masterpages?

  2. Pepi
    Pepi avatar
    981 posts
    31 Jan 2017
    28 Nov 2008
    Link to this post
    Hello Kalvin,

    Unfortunately, we cannot reproduce the described behavior locally. Please select the page in the site map using the child master, go to Properties tab and make sure you have set the page Title property in the Head Content section. If this property is not set, CurrentCmsNode.GetCmsPage.Title returns empty string. For details have a look at the screenshot.

    Also, I have attached the master pages which I have used for the test.

    Do let us know how it goes.

    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Kalvin MacLeod
    Kalvin MacLeod avatar
    19 posts
    15 Nov 2005
    01 Dec 2008
    Link to this post
    Turns out that when you create a nested masterpage in visual studio the default is 


    Where as it's set to true for normal masterpages. Did not know that. The working example you sent helped smarten me up. Thanks for you help.
Register for webinar
3 posts, 0 answered