Layout 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 layout of controls in a template.

<Layout
  Title="Text"
  LayoutTitle="Text"
/>

Attribute

Description

Title

Required. A string that identifies the element within its parent GroupTemplate element. The element's ID in the Document Object Model (DOM) is formed on the pattern "ParentId-Title".

LayoutTitle

Optional. An alternative identifier for the element. Use this attribute to provide a title when the value of the Title attribute is "Popup".

Minimum: 0

Maximum: unbounded

The following example is an XML fragment that defines a group template that has several Layout elements.

<GroupTemplate Id="Ribbon.Templates.FontGroup">
  <Layout Title="Large">
    <Section Type="TwoRow" Alignment="Middle">
      <Row>
        <ControlRef TemplateAlias="font" DisplayMode="Medium" />
        <ControlRef TemplateAlias="fontsize" DisplayMode="Medium" />
      </Row>
      <Row>
        <Strip>
          <ControlRef TemplateAlias="bold" DisplayMode="Small" />
          <ControlRef TemplateAlias="italics" DisplayMode="Small" />
          <ControlRef TemplateAlias="underline" DisplayMode="Small" />
          <ControlRef TemplateAlias="strikethrough" DisplayMode="Small" />
          <ControlRef TemplateAlias="subscript" DisplayMode="Small" />
          <ControlRef TemplateAlias="superscript" DisplayMode="Small" />
        </Strip>
        <Strip>
          <ControlRef TemplateAlias="backgroundcolor" DisplayMode="Small" />
          <ControlRef TemplateAlias="fontcolor" DisplayMode="Small" />
        </Strip>
        <Strip>
          <ControlRef TemplateAlias="clearformat" DisplayMode="Small" />
        </Strip>
      </Row>
    </Section>
    <OverflowSection Type="OneRow" TemplateAlias="o1" DisplayMode="Large"/>
  </Layout>
  <Layout Title="Medium">
    <Section Type="ThreeRow">
      <Row>
        <ControlRef TemplateAlias="font" DisplayMode="Medium" />
        <ControlRef TemplateAlias="fontsize" DisplayMode="Medium" />
      </Row>
      <Row>
        <Strip>
          <ControlRef TemplateAlias="bold" DisplayMode="Small" />
          <ControlRef TemplateAlias="italics" DisplayMode="Small" />
          <ControlRef TemplateAlias="underline" DisplayMode="Small" />
          <ControlRef TemplateAlias="strikethrough" DisplayMode="Small" />
          <ControlRef TemplateAlias="subscript" DisplayMode="Small" />
          <ControlRef TemplateAlias="superscript" DisplayMode="Small" />
        </Strip>
      </Row>
      <Row>
        <Strip>
          <ControlRef TemplateAlias="backgroundcolor" DisplayMode="Small" />
          <ControlRef TemplateAlias="fontcolor" DisplayMode="Small" />
        </Strip>
        <Strip>
          <ControlRef TemplateAlias="clearformat" DisplayMode="Small" />
        </Strip>
      </Row>
    </Section>
    <OverflowSection Type="ThreeRow" TemplateAlias="o1" DisplayMode="Medium"/>
  </Layout>
  <Layout Title="Popup" LayoutTitle="Large" />
</GroupTemplate>
Show:
© 2014 Microsoft