Template Entity updates

From Make 6.2 the following entities are added or updated with new functionality.

GroupBeta entity

You can now set Sinsitivity labels using the AssignedLabels in GroupBeta:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
<Configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.mavention.com/Graph/Make">
  <Providers>
    <Provider NodeName="Graph" Class="Mavention.Make.Engine.Providers.GraphProvider" Assembly="Mavention.Make.Engine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a43c589e76ba4e3d"/>
  </Providers>
  <Graph>
    <Groups>
      <GroupBeta DisplayName="{title}" Description="{title}" MailNickname="{mailNickname}" Visibility="{visibility}" >
        <Owners>
          <User UserPrincipalName="{owner}"></User>
        </Owners>
        <Members>
          <User UserPrincipalName="{member}"></User>
        </Members>
        <AssignedLabels>
          <AssignedLabel LabelId="00000000-0000-0000-0000-000000000000" />
        </AssignedLabels>
      </GroupBeta>
    </Groups>
  </Graph>
</Configurator>

HTTP Entity

For Graph templates we added the HTTP entity that allows you to make a HTTP request during template provisioning. These requests can be anonymous to any endpoint or authenticated for graph endpoints. The results of a call are written to the log file.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
<Configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.mavention.com/Graph/Make">
  <Providers>
    <Provider NodeName="Graph" Class="Mavention.Make.Engine.Providers.GraphProvider" Assembly="Mavention.Make.Engine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a43c589e76ba4e3d"/>
  </Providers>
  <Graph>
    <HttpRequests>
      <HttpRequest Url="https://graph.microsoft.com/v1.0/teams/6bca8a5e-efa5-4a5e-a4a5-55c814762f6e" Method="GET" Authenticated="true">
        <Headers>
          <Header Name="Test" Value="TestValue"></Header>
        </Headers>
        <Content MediaType="application/json">
          <Headers>
            <Header Name="TestBody" Value="TestBodyValue"></Header>
          </Headers>
          <Body>TestBody</Body>
        </Content>
      </HttpRequest>
    </HttpRequests>
  </Graph>
</Configurator>

Web entity now supports UseAccessRequestDefault

To disable Access Requests add the property to a Web entity with value false.

1
<RootWeb LCID="1033" Title="{title}" Url="{url}" UseAccessRequestDefault="false">

Section entity now supports Vertical Sections

Modern webparts can be grouped together in <Section> elements within the <ClientSidePage> element, these sections can be seen as rows within the page.

Sections can be configured by:

  • setting a background: None (default), Neutral, Soft, Strong
  • setting a section template: OneColumnFullWidth (default), TwoColumn, ThreeColumn, TwoColumnRight, TwoColumnLeft, OneColumnVerticalSection, TwoColumnVerticalSection, ThreeColumnVerticalSection, TwoColumnLeftVerticalSection, TwoColumnRightVerticalSection

Columns are vertical groupings of webparts within a section. Webparts are designated to a column by setting the Column attribute on the webpart element, the vertical order of the webpart is set through the Order attribute, the Layout attribute can either be 1 or 2 where 2 is the vertical section. There can be only one vertical section per page and it has only 1 column:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
<ClientSidePage Name="modernPageSample.aspx">
    <Sections>
    <Section SectionTemplate="OneColumnVerticalSection">
        <TextWebpart Column="1" Order="1">
        This will be the top left webpart
        </TextWebpart>
        <TextWebpart Column="1" Order="2">
        This will be the bottom left webpart
        </TextWebpart>
        <TextWebpart Column="1" Order="1" Layout="2">
        This will be the bottom right webpart
        </TextWebpart>
    </Section>
    </Sections>
</ClientSidePage>