Friday, February 15, 2008

Creating a Page Layout

Note: Paths are referencing the root of the 12 hive

1. In Visual Studio, add the .aspx file to /TEMPLATE/FEATURES/Project.Page Layouts/.

2. Under Site Settings → Galleries, select Site content types.

3. Create a new Site content type for the page layout. The Parent Content Type should be “Page” from “Publishing Content Types”.

4. After it’s created, grab the content type ID from the URL on the Site content type page (it’s the URL parameter that looks like this: 0×010100C568DB52D9D0A14D9B2FD1983DD007948)

5. Under Provisioned Files in the Page Layouts directory, copy a File node in the Module “New Page Layouts”—place it at the top of the list.

6. Edit the following property:

      

Substitute the “Level 2” for the Content Type Name and the 0×010… with the content ID that you just created.

7. Run stsadm to install (if the first time) and activate the Page Layouts feature.

stsadm -o installfeature -name Project.PageLayouts -force

stsadm -o activatefeature -name Project.PageLayouts -url "http://project.com" -force


No comments: