locked
Programatically inherit settings? RRS feed

  • Question

  • Hi all

    I am creating web templates, and programatically inherit the master page from parent site on site provisioning. I need to inherit some other settings as well, like "Page Layout and Site Template Settings", /_Layouts/AreaTemplateSettings.aspx.

    Any ideas how that can be acheived ?

    Monday, September 5, 2011 11:11 AM

Answers

  • Hi again

    Sorry for my really bad formulations.

    What I want to achieve is to have the property "Subsites inherit site templates from parent site" checked, on site provisioning of my web template.

    The property is found under: /_Layouts/AreaTemplateSettings.aspx (Site Actions > Site Settings > Page Layout and Site Template Settings)

     

    Regards.

    • Marked as answer by Zizhuoye Chen Tuesday, September 13, 2011 2:09 AM
    Tuesday, September 6, 2011 8:58 PM

All replies

  • What exactly do you mean? isnt that inherited by default?
    "T" | community.zevenseas.com/Blogs/Tanmay/default.aspx
    Monday, September 5, 2011 2:25 PM
  • PublishingWeb has a method SetDefaultPageLayout which gives you the way to change the default page layout programmatically. Refer the link http://stackoverflow.com/questions/4190576/sharepoint-how-do-i-change-the-default-page-layout-for-newly-created-subsites for detail.

    refer the below link to set the welcome page programmatically.

    http://www.praveenmodi.com/set-the-sharepoint-welcome-page-through-code/

     


    Regards, Dharnendra Shah "strong belief is the only way to success"
    Monday, September 5, 2011 2:30 PM
  • What exactly do you mean? isnt that inherited by default?
    "T" | community.zevenseas.com/Blogs/Tanmay/default.aspx


    Hi Tanmay

    It is not inherited by default, even if the "Reset all subsites to inherit these preferred subsite template settings Page layouts and site templates" - check box is checked at site collection level.

    If I create a web template with publishing feature, it does not inherit the site templates and page layout settings from the site collection. It only shows a wiki and publishing site with workflow template.



    Monday, September 5, 2011 7:47 PM
  • Hi again

    Sorry for my really bad formulations.

    What I want to achieve is to have the property "Subsites inherit site templates from parent site" checked, on site provisioning of my web template.

    The property is found under: /_Layouts/AreaTemplateSettings.aspx (Site Actions > Site Settings > Page Layout and Site Template Settings)

     

    Regards.

    • Marked as answer by Zizhuoye Chen Tuesday, September 13, 2011 2:09 AM
    Tuesday, September 6, 2011 8:58 PM