ASPX templates
Version 5.x > ASPX templates > Meta Description is missing View modes: 
User avatar
Member
Member
seanbun - 1/4/2011 4:47:47 PM
   
Meta Description is missing
Hi,

I am using ASPX template on Kentico5.0. I have entered the meta description field on the document -> property -> metadata section, but I could not see on the actual html page header. Do I need to create other control in the header control on master page?

Cheers,
Matt

User avatar
Kentico Support
Kentico Support
kentico_radekm - 1/6/2011 8:25:39 AM
   
RE:Meta Description is missing
Hello.

You do not need to have some special web part for this purpose on your master page or content page, it should be added automatically into one particular literal control.

When you see source code (rendered html code) of your page, can you see following tags within?

<meta name="description" ... /> 
<meta name="keywords" ... />


Could you please whether your physical master page contains this control?

<asp:literal runat="server" id="ltlTags" enableviewstate="false" />


Best Regards,
Radek Macaik



User avatar
Member
Member
seanbun - 1/6/2011 4:52:21 PM
   
RE:Meta Description is missing
It is a bit weird. I have the title and literal controls in my head and still cannot see the meta description and keywords in the rendered html code. Please find my head code below.

<head runat="server" enableviewstate="false">
<asp:Literal runat="server" ID="ltlTags" EnableViewState="false" />
<title runat="server"></title>

and some css and jquery links ....

</head>

User avatar
Member
Member
pierre.gagnon-csst.qc - 1/7/2011 9:32:17 AM
   
RE:Meta Description is missing
Hello.

Can you please see code-behind of your master/aspx page and let me know, if there is following code as well? This fills given literal (which you have) with proper data:

protected override void OnPreRender(EventArgs e)

{

base.OnPreRender(e);

this.ltlTags.Text = this.HeaderTags;

}


Thank you.

Best Regards,
Radek Macalik

User avatar
Member
Member
seanbun - 1/24/2011 5:36:11 PM
   
RE:Meta Description is missing
I found out the reason.

Basically, I have downloaded Visual Studio template from the market place and installed in my vs. I created my master page using the template. I realised the master page inherited the CMSMasterPage which cause the missing description issue. I now have changed to TemplateMasterPage and the issue is resolved.

Is the CMSMasterPage class missing the description property?

Cheers,
Matt

User avatar
Kentico Support
Kentico Support
kentico_radekm - 1/25/2011 3:35:38 AM
   
RE:Meta Description is missing
Hello.

Yes, it is possible. I suppose TemplateMasterPage is "lower" and contains this functiinality, while CMSMasterPage does not. Thank you for posted this solution here.

Best Regards,
Radek Macalik