ASPX templates
Version 3.x > ASPX templates > Page Title in Version 3.x not working View modes: 
User avatar
Member
Member
ajksharma-yahoo - 7/20/2011 2:18:02 AM
   
Page Title in Version 3.x not working
(Sorry for the cross post as I had posted this message in the 5.x section too, please delete that, thanks)

HI,

I have inherited a Kentico CMS version 3.x project
I have read all posts for "page title" not being displayed from the metatabs section located in the CMS-DESK, but it still doesn't work

The meta-tags & meta-description are working though

This is the Code in the master page

protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
this.ltlTags.Text = this.HeaderTags; 'this is working for meta-tags
this.ltlpagetitle.Text =this.TemplatePage.Title.ToString(); 'this isn't working though , I get a blank string
}



Thanks
Ajay

User avatar
Member
Member
ajksharma-yahoo - 7/21/2011 12:59:52 AM
   
RE:Page Title in Version 3.x not working
Hi,

Would appreciate if someone could help me please

Thanks
Ajay

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 7/21/2011 5:15:31 AM
   
RE:Page Title in Version 3.x not working
Hi,

Could you please specify the version number exactly, including the build number so I can take a look at the same version you are using?

Moreover, the page title value(s) are being set in Site Manager -> Settings -> Web site in "Page title format/prefix" settings. You may also use the drop down list to select your site to make sure these settings are inherited for your site.

Best regards,
Juraj Ondrus

User avatar
Member
Member
ajksharma-yahoo - 7/21/2011 6:23:41 AM
   
RE:Page Title in Version 3.x not working
Hi,

We are using Version: 3.0 Build: 3.0.2950
About the site manager settings, I have already checked them and they look good

Thanks
Ajay


User avatar
Kentico Support
Kentico Support
kentico_jurajo - 7/22/2011 3:08:25 AM
   
RE:Page Title in Version 3.x not working
Hi,

It is working fine for me on your version too. Could you please check that the settings are inherited from the global settings on your site too?

Also, you can try using this - CMS.CMSHelper.CMSContext.CurrentPageInfo.PageTitle to get the page title (this one is better than getting it from the TemplatePage).

Best regards,
Juraj Ondrus