In Blogs, Mavention Make, Techblog

Example of adding a ScriptEditor WebPart to a WebPart page.

See blogpost ‘Mavention Make WebPart pages‘ for more information about WebParts and Mavention Make

<Configurator xmlns="http://schemas.mavention.com/SharePoint/Apps/SiteConfigurator">
   <Providers>
      <Provider NodeName="Web" Class="Mavention.Make.Engine.Providers.WebProvider" Assembly="Mavention.Make.Engine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a43c589e76ba4e3d" />
   </Providers>
   <Web LCID="1043" Title="{title}" Url="{url}" Template="STS#0" WelcomePageUrl="SitePages/Start.aspx">
      <Properties>
         <Property Name="WebTemplate">Projectsite</Property>
         <Property Name="WebTemplateVersion">1.0.0.0</Property>
      </Properties>
      <Lists>
         <List Url="SitePages" TemplateType="119" Title="Sitepagina's" ContentTypesEnabled="true">
            <RootFolder Name="">
               <Files>
                  <File ContentTypeId="0x01010901007B796C610D68A143A455C04F844830B4" Name="Start.aspx" Overwrite="true" FileSource="Assets/Start.aspx">
                     <WebParts>
                        "><WebPart Title="Script editor WebPart" ZoneId="RightColumn" ZoneIndex="0">
                        <![CDATA[
                        <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>Kan dit webonderdeel niet importeren.</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">Hiermee kunnen auteurs HTML-fragmenten of -scripts invoegen.</property>
                                    <property name="Content" type="string">&lt;script type="text/javascript"&gt;alert("Hello world");&lt;/script&gt;</property>
                                    <property name="CatalogIconImageUrl" type="string" />
                                    <property name="Title" type="string">Script editor WebPart</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">Default</property>
                                    <property name="AllowConnect" type="bool">True</property>
                                    <property name="Width" type="unit">300px</property>
                                    <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>
                        ]]>
                        </WebPart>
                     </WebParts>
                  </File>
               </Files>
            </RootFolder>
         </List>
      </Lists>
   </Web>
</Configurator>

Vul je zoekopdracht in.