Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > How to create a completely blank page? View modes: 
User avatar
Member
Member
Leandro Brito - 2/21/2012 12:30:35 PM
   
How to create a completely blank page?
Hi,

I'm trying create a empty page using the template "empty" and setting the configuration to "Do not inherit any content", but it is not work for me, always the master page content (header) is show on page, loading javascripts, css and html content.
I tried other ways, removing layout components, webzones, webparts, creating a new blank master page but nothing works.

I need create files like .xml and that content disrupts the xml format.

Is possible to create full empty page for this purpose?

Thanks.

User avatar
Kentico Support
Kentico Support
kentico_radekm - 2/27/2012 6:54:10 AM
   
RE:How to create a completely blank page?
Hello.

In Kentico CMS, when using Portal engine development model, some important tags are added into head section of every rendered page automatically, as there is some important data which needs to be rendered no matter what template you are using.
Usual content of this automatically rendered code is this:


<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="content-script-type" content="text/javascript" />
<link href="/ CMSPages/GetResource.ashx?stylesheetname=<siteCodeName>" type="text/css" rel="stylesheet"/>
<link href="/ favicon.ico" type="image/x-icon" rel="shortcut icon"/>
<link href="/ favicon.ico" type="image/x-icon" rel="icon"/>


If you want to change it somehow, there is nothing easier than navigate to <project folder>\CMSPages\PortalTemplate.aspx.cs file and change content of “HeaderTags” string variable.

For example, let’s say I want to remove whole “<meta http-equiv="pragma" content="no-cache" /> ” line from code above.

It can be done like this:


// Init the header tags
tags.Text = HeaderTags;
tags.Text = tags.Text.Replace("<meta http-equiv=\"pragma\" content=\"no-cache\" />", "");


When using ASPX templates instead of Portal engine pages, you can use the same approach, however you need to do it in code-behind of particular master page you are using, e.g. <project folder>/CMSTemplates/BlankAspx/Blank.master.cs.

Best Regards,
Radek Macalik