GroupTemplate Element

Last modified: July 15, 2011

Applies to: SharePoint Foundation 2013 | SharePoint Server 2013

In this article
Attributes
Child Elements
Parent Elements
Occurrences

Defines the scaling behavior for controls in a Group element.

<GroupTemplate
  Id="Text"
  ClassName="CSS Class Selector"
/>

Attribute

Description

Id

Required. A string that unambiguously identifies the element, such as "Ribbon.Templates.CustomTemplateExample".

ClassName

Optional. The name of a CSS class selector to apply to the group.

Minimum: 0

Maximum: 1

The following example defines a custom group template.

<GroupTemplate Id="Ribbon.Templates.CustomTemplateExample">
  <Layout
    Title="OneLargeTwoMedium" LayoutTitle="OneLargeTwoMedium">
    <Section Alignment="Top" Type="OneRow">
      <Row>
        <ControlRef DisplayMode="Large" TemplateAlias="row1" />
      </Row>
    </Section>
    <Section Alignment="Top" Type="TwoRow">
      <Row>
        <ControlRef DisplayMode="Medium" TemplateAlias="row2" />
      </Row>
      <Row>
        <ControlRef DisplayMode="Medium" TemplateAlias="row3" />
      </Row>
    </Section>
  </Layout>
</GroupTemplate>

Show: