Forum Discussion
David Moore
Sep 29, 2016Copper Contributor
OfficeDev PnP - Provision Page content?
I know there's a <pnp:Pages> element in the schema, but it seems to only provision web part XML. Is there any way to add just HTML to a wiki page content, rather than having to wrap it in a Content E...
Deleted
Sep 29, 2016you could do it like this:
<pnp:WebPart Column="1" Row="1" Title="Script Editor">
<pnp:Contents>
<webParts>
<webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
<metaData>
<type name="Microsoft.SharePoint.WebPartPages.ScriptEditorWebPart, Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
<importErrorMessage>Cannot import this Web Part.</importErrorMessage>
</metaData>
<data>
<properties>
<property name="ExportMode" type="exportmode">All</property>
<property name="HelpUrl" type="string" />
<property name="Hidden" type="bool">False</property>
<property name="Description" type="string">Allows authors to insert HTML snippets or scripts.</property>
<property name="Content" type="string">
Add some project info here.<br /><br />
<div style="float:left; width:150px; padding-right:12px;">
<div >
<a href="{SiteCollection}/TEN" title="test">
<img width="150" height="124" src="{SiteCollection}/SiteAssets/Tiles/test.jpg"/>
</a>
</div>
<div>
<a href="{SiteCollection}/TEN" title="test">
<h2 style="text-align:center;">test</h2>
</a>
</div>
</div>
<div style="float:left; width:150px; padding-right:12px;">
<div >
<a href="{SiteCollection}/EXE" title="Execution">
<img width="150" height="124" src="{SiteCollection}/SiteAssets/Tiles/EXE.jpg"/>
</a>
</div>
<div>
<a href="{SiteCollection}/EXE" title="test">
<h2 style="text-align:center;">test</h2>
</a>
</div>
</div>
<div style="float:left; width:150px; padding-right:12px;">
<div >
<a href="{SiteCollection}/CLO" title="test">
<img width="150" height="124" src="{SiteCollection}/SiteAssets/Tiles/test.jpg"/>
</a>
</div>
<div>
<a href="{SiteCollection}/CLO" title="test">
<h2 style="text-align:center;">test</h2>
</a>
</div>
</div>
</property>
<property name="CatalogIconImageUrl" type="string" />
<property name="Title" type="string">Script Editor</property>
<property name="AllowHide" type="bool">True</property>
<property name="AllowMinimize" type="bool">True</property>
<property name="AllowZoneChange" type="bool">True</property>
<property name="TitleUrl" type="string" />
<property name="ChromeType" type="chrometype">None</property>
<property name="AllowConnect" type="bool">True</property>
<property name="Width" type="unit" />
<property name="Height" type="unit" />
<property name="HelpMode" type="helpmode">Navigate</property>
<property name="AllowEdit" type="bool">True</property>
<property name="TitleIconImageUrl" type="string" />
<property name="Direction" type="direction">NotSet</property>
<property name="AllowClose" type="bool">True</property>
<property name="ChromeState" type="chromestate">Normal</property>
</properties>
</data>
</webPart>
</webParts>
</pnp:Contents>
</pnp:WebPart>