คำตอบ How to Add Ribbon to NewForm.aspx

  • segunda-feira, 28 de maio de 2012 05:07
     
      Contém Código

    i want like this



    but actually i want show "Show me "to Page.Edit(group edit) < url=SupportedContentRequest/NewForm.aspx >





    in this article http://sharepointsriram.wordpress.com/2012/01/05/sharepoint-2010-add-button-to-ribbon-with-sharepoint-designer/

    explain add Ribbon to newForm (default sharepoint , not direct to SupportedContentRequest/NewForm.aspx in sharepoint designer)

    here my code in element SupportedContentRequest


    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
      <CustomAction
      Description="Show Message "
      Title="Show Me"
      Id="{E538E8C7-65DA-454E-AD87-4A603B6CC569}"
      Location="CommandUI.Ribbon.NewForm"
      RegistrationId="100"
      RegistrationType="List"
      Sequence="0"
      Rights="ViewListItems"
      xmlns="http://schemas.microsoft.com/sharepoint/">
        <CommandUIExtension xmlns="http://schemas.microsoft.com/sharepoint/">
          <!-- Define the (UI) button to be used for this custom action -->
          <CommandUIDefinitions>
            <CommandUIDefinition Location="CommandUI.Ribbon.ListForm.New.Page.Edit.Controls._children">
              <Button
               Id="Ribbon.ListForm.Display.Manage.AttachFile"
                     Sequence="0"
             Command="AttachFile"
              Image32by32="~site/_layouts/Images/BingSearch/bing32.png"
              Image16by16="~site/_layouts/Images/BingSearch/bing16.png"
             
              LabelText="Show me"
              Description="Show Message"
              TemplateAlias="o1"
    />
            </CommandUIDefinition>
          </CommandUIDefinitions>
          <CommandUIHandlers>
            <!-- Define the action expected on the button click -->
            <CommandUIHandler Command="AttachFile" CommandAction="javascript:window.open('http://www.bing.com/search?q='.concat(escape(document.title)))" />
          </CommandUIHandlers>
        </CommandUIExtension>
      </CustomAction>
    </Elements>




    • Editado Qwerty-Yuiop segunda-feira, 28 de maio de 2012 05:08
    • Editado Qwerty-Yuiop segunda-feira, 28 de maio de 2012 05:58
    •  

Todas as Respostas