Share via


GroupTemplate Element

Applies to: SharePoint Foundation 2010

Defines the scaling behavior for controls in a Group element.

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

Attributes

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.

Child Elements

Layout

Parent Elements

RibbonTemplates

Occurrences

Minimum: 0

Maximum: 1

Example

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>