Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Modifying Head Tags View modes: 
User avatar
Member
Member
positivepurchasing - 1/16/2013 9:58:17 AM
   
Modifying Head Tags
Hi,

How do you modify tags in the head, such as 'meta http-equiv' in version 7 as you could in version 6, see link below.

Version 6: - http://devnet.kentico.com/Knowledge-Base/portalengine/How-to-modify-default-header-tags.aspx

Cheers
Paul.

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 1/17/2013 9:57:00 AM
   
RE:Modifying Head Tags
Hi,

The same solution should work also in the v7.

Best regards,
Martin Danko

User avatar
Member
Member
positivepurchasing - 1/17/2013 10:02:29 AM
   
RE:Modifying Head Tags
Hi Martin,

OK, great.

Many thanks
Paul.

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 1/17/2013 12:34:01 PM
   
RE:Modifying Head Tags
Martin, I've tried the exact code line for line and it isn't working for me.
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);

// Init the header tags
tags.Text = HeaderTags;
tags.Text = tags.Text.Replace("<meta http-equiv=\"cache-control\" content=\"no-cache\" />", "");
tags.Text = tags.Text.Replace(" type=\"text/css\"", "");
tags.Text = tags.Text.Replace(" type=\"image/x-icon\"", "");

if (CMSContext.ViewMode == ViewModeEnum.Wireframe)
{
CSSHelper.RegisterWireframesMode(this);
}
}

When I view my source, it still shows the <meta> tag and all the other items.

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 1/18/2013 2:16:57 AM
   
RE:Modifying Head Tags
Hi,

I've tested it by myself and it's working also on the v7. I think that in your case it can be caused by caching, especially on the server side. So try also to clear the cache via the CMS Site Manager not just in the browser.

Best regards,
Martin Danko