0

I want to divide displayForm.aspx ribbon into 3 parts instead of 2 parts Manage and Action . Is it possible to do this sp designer 2010? If yes, how?

Here i want to create group and place my custom buttons.

Thank You.

Flying Hope
  • 357
  • 2
  • 8
  • 20

1 Answers1

0

You need to create a new Group in ribbon. An example code:

<CustomAction
    Id="Ribbon.ListForm.Display.Reservations.ReturnCustomAction"
    RegistrationId="106"
    RegistrationType="List"
    Location="CommandUI.Ribbon.DisplayForm"
    Title="Mark as Returned"
    GroupId="Reservations">
    <CommandUIExtension>
      <CommandUIDefinitions>

        <CommandUIDefinition Location="Ribbon.Templates._children">
          <GroupTemplate Id="Reservations.Templates">
            <Layout Title="Large">
              <Section Type="OneRow">
                <Row>
                  <ControlRef TemplateAlias="c1" DisplayMode="Large" />
                </Row>
              </Section>
            </Layout>
          </GroupTemplate>
        </CommandUIDefinition>
        <CommandUIDefinition Location="Ribbon.ListForm.Display.Scaling._children">
          <MaxSize Id="Ribbon.ListForm.Display.CustomActionGroup.MaxSize"
                   Sequence="55"
                   GroupId="Ribbon.ListForm.Display.CustomActionGroup"
                   Size="Large" />
        </CommandUIDefinition>
        <CommandUIDefinition Location="Ribbon.ListForm.Display.Groups._children">
          <Group Id="Ribbon.ListForm.Display.CustomActionGroup"
                 Sequence="155"
                 Description="Group for reservations"
                 Title="Reservations"
                 Template="Reservations.Templates">
            <Controls Id="Ribbon.ListForm.Display.CustomActionGroup.Controls">
              <Button Id="Ribbon.ListForm.Display.CustomActionGroup.Reservations.Return"
                      Command="MarkAsReturned"
                      Sequence="55"
                      Image16by16="/_layouts/1033/images/formatmap16x16.png"
                      Image32by32="/_layouts/1033/images/formatmap32x32.png" Image32by32Left="-352"
                      Description="Add selected applications to a group"
                      LabelText="Mark as Returned"
                      TemplateAlias="c1" />
            </Controls>
          </Group>
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler
          EnabledScript="return true;"
          Command="MarkAsReturned"
          CommandAction="javascript:alert('hello there');" />
      </CommandUIHandlers>
    </CommandUIExtension>
  </CustomAction>

Source: how do i place custom action in custom group on displayform?

http://msdn.microsoft.com/en-us/library/office/ff407214(v=office.14).aspx

Nadeem Yousuf-AIS
  • 18,707
  • 4
  • 28
  • 59
  • Hello Nadeem.. The thing is that I couldnt find any elements.xml file in my list's DisplayForm.aspx in sp designer2010. Strictly we are avoiding vs. my project is completely developing on oob. Thank you. – Flying Hope Mar 18 '14 at 07:30
  • Nadeem is correct, but if using designer, take a look at this link and scroll to the bottom as it has an example of using designer: http://msdn.microsoft.com/en-us/library/hh500259(v=office.14).aspx – spevilgenius Mar 18 '14 at 08:29