Return to doc.sitecore.com

  Layout/Sublayout Markup
Prev Next

Layout changes are rather straightforward. You will need to change the page header and optionally register additional controls that are no longer supplied with the Sitecore.Kernel assembly.

1.  Changing the Page Header

Here’s a typical header of Sitecore V4 page: 

<%@ Page language="c#" Inherits="Sitecore.BasePage" Codepage="65001" %>

<%@ register TagPrefix="sc" Namespace="Sitecore.WebControls" Assembly="Sitecore.WebControls" %>

<%@ OutputCache Location="None" VaryByParam="none" %> 

It needs the following changes: 

1. Inherit from System.Web.UI.Page. Sitecore V5 no longer requires you to derive your pages from custom Sitecore page.

<%@ Page language="c#" Inherits="System.Web.UI.Page" Codepage="65001" %> 

2. Core web controls such as placeholder and xslrendering are now part of the Sitecore.Kernel assembly, therefore you need to register the sc tagprefix as:

<%@ register TagPrefix="sc" Namespace="Sitecore.Web.UI.WebControls" Assembly="Sitecore.Kernel" %>

2.  Registering Additional Web Controls

If your page depended on additional controls from Sitecore.WebControls library in Sitecore V4, such as menu and breadcrumb, you will need to register their V5 versions.  

You have two options:  

  1. Download the entire Sitecore.WebControls library ported to Sitecore V5 .
     
    Sitecore WebControl binaries 
    Sitecore WebControl sources (VS 2005 project) 
     
  2. Download the control you need as a separate project from Sitecore Web Controls section on SDN5. The separate versions might be updated less frequently. 

In any case, once you’ve downloaded the Sitecore V5 version of the control, register it in the page header and update the control declaration with the new tag prefix:  

<%@ register TagPrefix="scWebControls" Namespace="Sitecore.WebControls" Assembly="Sitecore.WebControls" %>

<scWebControls:Menu … runat=”server” />  

Sitecore V5 version of Sitecore.WebControls are distributed under Shared Source license, allowing you to make any necessary modifications to the controls themselves.


Prev Next