In Blogs, Mavention Make

Mavention Make is a site provisioning engine for SharePoint. In a quick and easy way you can create or update sites, site collections, groups and modern team sites using templates. You also can provision the SharePoint PnP Provisioning templates using the Mavention Make provisioning engine.

In this blog post we will start defining a minimal (Make) template to create a new site collection. You can use this template to getting started creating your templates. Every template consists minimal of two things, the actual template (defined in the configuration.xml) and its metadata.

Getting started with a minimal template

The template in this example will only create a site collection based on the STS#0 (Team Site) web template. For this template a Microsoft Local ID (LCID) of 1043 (Dutch) is used, The TimeZoneId value is set to 4 ((UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna). For the StorageQuota you define the value in megabytes, in this example we use 1024 to set the limit to 1 gigabyte.

Every Make template requires to have two properties named “WebTemplate” and “WebTemplateVersion”. These values are used by the (batch) update templates.

Template

A Make template is best created in a XML Schema capable editor like Microsoft Visual Studio. In the provided zip-file with the Mavention Make software, you will find in the “Documentation” folder the file called “XmlSchemas_MakeEngine.zip”. This zip-file contains all the XML Schema’s (XSDs) which you can import in i.e. Visual Studio to get code completion.

<Configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.mavention.com/SharePoint/Apps/SiteConfigurator">
 <Providers>
 <Provider NodeName="Site" Class="Mavention.SharePoint.SiteConfigurator.Providers.SiteProvider" Assembly="Mavention.SharePoint.SiteConfigurator, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a43c589e76ba4e3d"/> </Providers>
 <Site Url="{url}" Title="{title}" OwnerLogin="{siteowner}" Template="STS#0" LCID="1043" StorageQuota="1024" TimeZoneId="4">
 <RootWeb LCID="1043" Title="{title}" Url="{url}" Description="{description}">
 <Properties>
 <Property Name="WebTemplate">My First Mavention Make Site</Property>
 <Property Name="WebTemplateVersion">0.0.0.1</Property>
 </Properties>
 </RootWeb>
 </Site>
</Configurator>

Parameters

In a Make template you can make use of parameters, which are placeholders in a Make template. In this example we have used the following parameters: {url}; {title}; {siteowner} and {description}. These parameters are not defined by Mavention Make, but you need to define your own in the metadata column “Parameters” of the Make template file. These parameters are defined in a JSON object and for this example it looks like:

{
 "d": {
 "parameters": [{
 "id": "url",
 "title": "Site URL",
 "inputType": "text",
 "required": true,
 "sampleValue": "https://tenant.sharepoint.com/sites/sitecollectie"
 }, {
 "id": "title",
 "title": "Title",
 "inputType": "text",
 "required": true,
 "sampleValue": "My Team"
 }, {
 "id": "description",
 "title": "Description",
 "inputType": "multiline",
 "required": false,
 "sampleValue": "Site for My Team"
 }, {
 "id": "siteowner",
 "title": "Siteowner",
 "inputType": "text",
 "required": false,
 "sampleValue": "site-owner@tenant.onmicrosoft.com"
 }]
 }
}

Mavention Make Configurations list

In the Mavention Make Configuration list are all the available templates defined. In this list you can add new templates, which can be use by Mavention Make to provision or update sites.

Upload the (above) Make template to the Configurations list in its own folder (i.e. “My First Mavention Make Site”).

Mavention Make Configuration list

The template needs at least the “Start object type” and the “Parameters” defined.
Where the “Start object type” can be defined as “Site” (site collection) or “Web” (sub web).

Mavention Male Configuration

Related articles

 

Vul je zoekopdracht in.