I have created web scoped feature and added it to onet.xml of a web template. this feature tries to add a web part to default.aspx file. the problem is when I create a site and feature triggers the default.aspx page does not exist. How do I add a web part to a web site as soon as you create it. the reason I don't add the web part as AllUsersWebPart in onet.xml file is that the web part is content editor web part and I have tried to change its chrome type to None as a property like following but I don't succeeded

<AllUsersWebPart WebPartZoneID="left" WebPartOrder="1">
      <WebPart xmlns="http://schemas.microsoft.com/WebPart/v2">
      <Assembly>Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
      <property name="ChromeType" type="chrometype">None</property> 
  • 1
    I Solved it. By using powershell. directly after I crate the web I have added a function which create the webpart adds it to default.aspx. – Medes Sep 17 '12 at 8:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.