Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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">
      <![CDATA[
      <WebPart xmlns="http://schemas.microsoft.com/WebPart/v2">
      <Assembly>Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
      <TypeName>Microsoft.SharePoint.WebPartPages.ContentEditorWebPart</TypeName>
      <Title>-</Title>
      <Description></Description>
      <PartImageLarge>/_layouts/images/mscontl.gif</PartImageLarge>
      <FrameType>TitleBarOnly</FrameType>
      <property name="ChromeType" type="chrometype">None</property> 
      </WebPart>     
      ]]>
    </AllUsersWebPart>
share|improve this question
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.