Kentico CMS 6.0 Context Help

New/Edit page layout

New/Edit page layout

Previous topic Next topic Mail us feedback on this topic!  

New/Edit page layout

Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic!  

The following properties of the page layout can be configured on this page:

 

Layout display name

Name of the layout which will be displayed in the page layout list.

Layout code name

A unique name that will be used to identify the page layout (e.g. in code).

Layout description

Can be used to enter an optional text description for the page layout.

Page layout thumbnail

Upload field for the layout preview image (available only when editing an existing layout). This image is used in the page layout selection dialog shown when creating a new blank page.

 

When a file is uploaded in the field, two icons are displayed next to it:

 

Edit (Edit) - if the file is an image, clicking the icon opens the image in the built-in image editor. If the file is not an image (which would not make sense as no thumbnail could be displayed), the metadata editor is opened after clicking the icon.

Delete (Delete) - removes the file from the field.

Layout type

Allows you to choose from two possible types of layout code:

 

ASCX - with this option, the code of the layout will support ASCX markup, i.e. the same syntax that you would use to edit a standard web form or user control, including inline code. Web part zones can be added as controls, for example:
<cms:CMSWebPartZone ID="zoneLeft" runat="server" />
 
Please note that for security purposes, ASCX layouts may only be edited by users who have the Edit ASCX code permission for the Design module.

 

HTML - if this option is selected, the layout code will be processed as basic HTML. This means that ASCX markup, such as controls or inline code, will not work when the layout is rendered. Web part zones may be added through the following type of expression:
{^WebPartZone|(id)zoneLeft^}

 

Layout code

This is where you can enter the actual code that will be used for the custom page layout. The format used when the code is processed depends on the selected Layout type.

CSS styles

This field becomes available if you click the Add CSS styles link below the layout's code editor.

 

Here you can define any CSS classes used within the code of the layout. Once the page layout is assigned to a page template, the specified styles will be loaded on all pages that use the given template. Please note that this requires the Allow CSS from components setting to be enabled in Site Manager -> Settings -> System -> Performance.

 

For more information about CSS styles of page components, please see the Development -> CSS stylesheets and design -> CSS for page components topic in the Developer's Guide.

 

Any changes to the code of the layout must be confirmed by clicking the Save Save button. You can also Check out (CheckOut) the layout to a file and edit it in an external editor. The file will be saved on the disk where the web application is running. After this you can check the layout back in (CheckIn) or undo the checkout using the appropriate buttons.