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 a custom web template which uses onet.xml file of 15hive\TEMPLATE\SiteTemplates\sts\xml and following is the element.xml file. However when I create a sub site based on this custom team site it is empty and does not contain promoted liks. I would like to add Promoted links to the custom web template. Here is the element.xml

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <WebTemplate
     Name="MyTeamSite"
     BaseTemplateName="STS"
     BaseTemplateID="1"
     BaseConfigurationID="0"
     Title="Samarbetsportalen"
     Description="blahblah)."
     DisplayCategory="mygroup"/>
</Elements>

I tried to add the web part to the onet.xml like this but it still empty

  <AllUsersWebPart WebPartZoneID="Left" WebPartOrder="0">
           <![CDATA[
                 <WebPart xmlns="http://schemas.microsoft.com/WebPart/v2">
                     <Assembly>Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
                     <TypeName>Microsoft.SharePoint.WebPartPages.GettingStartedWebPart</TypeName>
                     <Title>title</Title>
                     <Description>description</Description>
                 </WebPart>
                    ]]>
    </AllUsersWebPart>
share|improve this question

1 Answer 1

You cannot provision Web Parts in Modules element using a Web Template. Consider adding a feature receiver or a Module SPI.

share|improve this answer
    
Thanks, Actually it is provisioned but it provisioned to default.aspx not sitepages/home.aspx. Yes using features but not so easy to add webparts to wiki pages. –  Medes May 28 '13 at 7:12

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.