sharepoint - Deploy a Page based on a Custom Layout in SP2010 -
I am able to deploy a custom page layout successfully and see it in the masterpage gallery. I can also manually create a page from this layout.
What I want to do, is automatically positioned with the package based on custom layout in my site definition.
How do I deploy a page and tell the page to use the layout? You can create page examples by using the
module
/ P>
I think your page layout page is named RootWebOnly = "false" & gt; & Lt; File Url = "YourModuleName / Home.aspx" type = "GhostableInLibrary" IgnoreIfAlreadyExists = "TRUE" & gt; & Lt; / File & gt; & Lt; / Module & gt; to: Check here: I have just created a demo project to understand properly. You can see my solution structure simply added a module name page layout and put a PageLayout page. I used the module Full Element.xml file of: Hope it helps! Home.aspx , for example
Home.aspx < P>
& lt; Module name = "custom page" url = "page" path = "" rootwb only = "incorrect" & gt; & Lt; File name = "Home.aspx" Url = "Home.aspx" type = "GhostableInLibrary" path = "Home.aspx" IgnoreIfAlreadyExists = "TRUE" & gt; & Lt; Property Name = "Title" Value = "Home" /> & Lt; Property Name = "Publication Page Layout" Value = "~ SiteCloth / _catalogs / Masterpage / Home.aspx" /> & Lt; Property name = "content type" value = "page" /> & Lt; / File & gt; & Lt; / Module & gt;
Update:
element xmlns = "http://schemas.microsoft.com/sharepoint/" & gt; & Lt; Module name = "pagelayout" url = "_catalog / masterpages" path = "" rootwboneily = "true" & gt; & Lt; File path = "PageLayouts \ CustomPageLayouts.aspx" Url = "CustomPageLayouts.aspx" type = "GhostableInLibrary" IgnoreIfAlreadyExists = "TRUE" & gt; & Lt; Property Name = "Title" Value = "Custom General Page" /> & Lt; Property Name = "MasterPage Description" Value = "Custom General Page Layout" /> & Lt; Property Name = "ContentTip" value = "$ resource: cmscore, content type_pagellout_name;" / & Gt; & Lt; Property name = "publication preview image" value = "~ siteconction / _catalog / masterpage / $ resource: core, culture; / preview images / wellpishships, ~ sitecolutions/catalog/ masterpage/ $ resource: core, culture; / preview images / welcomesplash .png "/> & Lt; Property Name = "Publishing Unassigned Content Type" value = "; # $ Resource: CMScore, ContentTip_Willmake Page_Nav ;; # 0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF390064DEA0F50FC8C147B0B6EA0636C4A7D4; #" /> & Lt; / File & gt; & Lt; / Module & gt; & Lt ;! - Create page examples from page layout of CustomPageLayouts.aspx - & gt; & Lt; Module name = "custom page" url = "page" path = "" rootwobone = "incorrect" & gt; & Lt; File name = "home. Espx" url = "home. Espx" type = "gottable in library" path = "page layout \ custompage layout. Espx" IgnoreIfAlreadyExists = "TRUE" & gt; & Lt; Property Name = "Title" Value = "Home" /> & Lt; Property Name = "Publication Page Layout" Value = "~ Citalization / _catalogs / masterpage / custompageLayouts.aspx" / & gt; & Lt; Property name = "content type" value = "page" /> & Lt; / File & gt; & Lt; / Module & gt;
Comments
Post a Comment