Sharepoint Forum

 
Home » Forum » Sharepoint       Ask a questionRSS Feeds

Possible to make subsites automatically inherit available page layouts from parent page?

  Asked By: Britney Gregory         Date: Apr 12, 2010      Category: Sharepoint      Views: 876
 

We have created a custom site definition for a publishing site for our customer. Our customer wants to set the list of available page templates on the top level site and have it inherited all the way down to all subsites.

Is it possible to set the default value of available page layouts (Page layouts and site template settings > Page Layouts) to 'Pages inherit preferred layouts from parent site' ?

In our onet.xml there is an element called AvailablePageLayouts for a specific configuration. Can this be set to 'inherit' in some way?

Tagged:                      

 

2 Answers Found

 
Answer #1       Answered By: Bhavesh Doshi          Answered On: Apr 12, 2010       

AFAIK inheriting from the parent  site is the default  setting, so as long you don't set  anything explicitely, your site  should inherit  the AvailablePageLayouts from its parent.

 
Answer #2       Answered By: Elisa Santos          Answered On: Apr 12, 2010       

if no one has explicitly set  any page  layouts in child sites, it should inherit  by default. And, by definition, if you're creating a site  from a template, you wouldn't have any child sites yet. However, if you ever wanted to write cod that would explicitly set the available page layouts  (other than in the onet.xml file like you were noting), you could use the PublishingWeb.SetAvailablePageLayouts method. That method actually has a resetAllSubsitesToInherit property.

 


Your Answer
  • Answer should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].