1

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>

1 Answer 1

3

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

1
  • 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
    Commented May 28, 2013 at 7:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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