Thursday, October 22, 2009

Creating Custom Page Layouts notes?

Overview of Page Layouts?
Combined with master page to define the rendering of a content page
􀂃 Obtains master page from SPWeb.CustomMasterUrl
• Hosts field controls and Web Part zones
• Complies to the Page Layout content type
• Has an associated content type
􀂃 Dictates which content type the page layout is used for rendering
• Can bind multiple page layouts to content type
• Associated with exactly one content type
Page layouts live within the Master Page Gallery
􀂃 http://servername/_catalogs/masterpage
􀂃 Exists only in the top-level site within a site collection
• Upon site provisioning, page layout added to Master Page Gallery as GhostableInLibrary
􀂃 While living in the Master Page Gallery as uncustomized the page layout on the file system is used
Site Columns & Content Types In Publishing Sites
Site columns & content types play a key role in Publishing sites
• Both are used to define schema for content pages
• Content types must inherit from the Page content type (which inherits from System Page)
􀂃 Go to the following location for basic information
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\PublishingResources\PublishingContentTypes.xml
􀂃 The article page layout with the following content type

• Page layouts must be associated with content types
Why site Column?
Reusable column template for use within lists and content types
• Specify:
􀂃 Name & description
􀂃 Data type
􀂃 Site column group
• Scoped at the site level
􀂃 Available to child sites
• Adding to a list / content type creates a copy.
Create / manage many ways:
􀂃 Browser-based user interface
􀂃 SharePoint object model
􀂃 Feature XML
• Features & object model provide most control
􀂃 Easy to version in virtually all source control systems
􀂃 Highest level of reuse
Creating Site Columns with Features

Wt is the Content Types?
Enable storage of different types of content in
same list or library
• Specify:
􀂃 Name & description
􀂃 Site columns, workflows, event receivers, policies, etc.
􀂃 Content type group
• Scoped at the site level
􀂃 Available to child sites
• Adding to a list creates a copy
Create / manage many ways:
􀂃 Browser-based user interface
􀂃 SharePoint object model
􀂃 Feature XML
Creating Content Types with Features

Activate our feature..

After activation site columns and content types would appear like the below.

How to create a page layout using SPD2007?

Now you need to add some structure to this page. Cheat a bit by copying the contents of the ArticleLeft.aspx page layout and paste them into CusomPageLayout.aspx.
Drag and drop our site columns in a structured maner.Here I just drag n droping….


Wt are the difference b/w Field controls and WebParts?

I will try to explain how to deploy page layout through studio in future posts.
Thanks my WCM guru and Ian for giving support.

No comments: