Wednesday 5 February 2014

Set defult Page Layout in SharePoint in Home Page

Page Module:


<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Module Name="Pages" Url="$Resources:cmscore,List_Pages_UrlName;">
    <File Path="Master Page\Sample\SampleHome.aspx" Type="GhostableInLibrary" Url="SampleHome.aspx" IgnoreIfAlreadyExists="TRUE">           
      <Property Name="Title" Value="Home" />
      <Property Name="PublishingPageLayout" Value="/_catalogs/masterpage/Sample/SampleHome.aspx, Home" />
       <Property Name="ContentTypeId" Value="$Resources:cmscore,contenttype_pagelayout_name;" />
    </File>
  </Module>
</Elements>




Master Page Module:


<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Module Name="Master Page" Url="_catalogs/masterpage"  List="116" RootWebOnly="TRUE">
    <File Path="Master Page\Sample\SampleHome.aspx" Url="Sample/SampleHome.aspx"  Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE">
      <Property Name="PublishingAssociatedContentType" Value=";#Home;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900242457EFB8B24247815D688C526CD44D;#" />
      <Property Name="ContentType" Value="$Resources:cmscore,contenttype_pagelayout_name;" />
      <Property Name="Title" Value="Home"/>
      </File>
    <File Path="Master Page\Sample\Sample.master" Url="Sample/Sample.master" Type="GhostableInLibrary"/>
     

    <File Path="Master Page\Sample\Property-Management.aspx" Url="Sample/Property.aspx" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE">
      <Property Name="PublishingAssociatedContentType" Value=";#Property ;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900242457EFB8B24247815D688C526CD44D;#" />
      <Property Name="ContentType" Value="$Resources:cmscore,contenttype_pagelayout_name;" />
      <Property Name="Title" Value="Property"/>
    </File>
    <File Path="Master Page\Sample\Sal.aspx" Url="Orchards/Sales.aspx" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE">
      <Property Name="PublishingAssociatedContentType" Value=";#Sal;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900242457EFB8B24247815D688C526CD44D;#" />
      <Property Name="ContentType" Value="$Resources:cmscore,contenttype_pagelayout_name;" />
      <Property Name="Title" Value="Sal"/>
    </File>
    <File Path="Master Page\Sample\Let.aspx" Url="Sample/Lettings.aspx" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE">
      <Property Name="PublishingAssociatedContentType" Value=";#Let;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900242457EFB8B24247815D688C526CD44D;#" />
      <Property Name="ContentType" Value="$Resources:cmscore,contenttype_pagelayout_name;" />
      <Property Name="Title" Value="Let"/>        
     
    </File>
  </Module>
</Elements>

No comments:

Post a Comment