0

I have a custom upload form that I want to incorporate with new document libraries. Ideally, user will be able to add document libraries with this updated link to their site on their own without having to use SPD.

What is the best way to modify the document library upload link? I'm open to development if that is needed.

0

For the upload and related links, there are 7 locations where links need to be modified:

1) Ribbon - Documents - New Document > Custom Action Hide

2) Ribbon - Documents - Upload Document > Custom Action Replace

3) Ribbon - Manage - View Properties > Custom List Definition (schem.xml) - Form

4) Ribbon - Manage - Edit Properties > Custom List Definition (schem.xml) - Form

5) ECB - View Properties > Custom List Definition (schem.xml) - Form

6) ECB - Edit Properties > Custom List Definition (schem.xml) - Form

7) "Add new item" >

  1. Custom List Definition (schem.xml) - View - XslLink
  2. XSL - Custom vwstyles.xsl

Steps 1 & 2: http://msdn.microsoft.com/en-us/library/ee537543.aspx http://msdn.microsoft.com/en-us/library/ms460194.aspx http://msdn.microsoft.com/en-us/library/ff407619.aspx

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <CustomAction Id="Ribbon.Library.Actions.ReplacementButton"
        Location="CommandUI.Ribbon"
        RegistrationId="101"
        RegistrationType="List"
        Title="Replace a Ribbon Button">
        <CommandUIExtension>
          <CommandUIDefinitions>
            <!-- Hide OOTB Upload and New Document Buttons -->
            <CommandUIDefinition Location="Ribbon.Documents.New.AddDocument" />
            <CommandUIDefinition Location="Ribbon.Documents.New.NewDocument" />
            <!-- APC Upload Button -->
            <CommandUIDefinition
                Location="Ribbon.Documents.New.Controls._children">
                <Button Id="Ribbon.Documents.New.AddDocument.ReplacementButton"
                    Command="ReplacementButtonCommand"
                    Image16by16="/_layouts/apc/img/apclogo16.png"
                    Image32by32="/_layouts/apc/img/apclogo32.png"
                    LabelText="Upload Document"
                    Sequence="1"
                    TemplateAlias="o1" />
          </CommandUIDefinition>
        </CommandUIDefinitions>
            <CommandUIHandlers>
                <CommandUIHandler
                    Command="ReplacementButtonCommand"
                    CommandAction="javascript:alert('This button has been replaced.');" />
            </CommandUIHandlers>
        </CommandUIExtension>
    </CustomAction>
</Elements>

Steps 3 - 6

  <Form Type="DisplayForm" SetupPath="Layouts\MyView.aspx" Url="MyView.aspx" WebPartZoneID="Main" />
  <Form Type="EditForm" SetupPath="Layouts\MyEdit.aspx" Url="MyEdit.aspx" WebPartZoneID="Main" />

Steps 7

Essentially you'll be updating an XSL file.

Custom List Template > schema.xml > views.view.xsllink > custom_vwstyles.xsl

The blog post below walks you though all of the steps: http://byteloom.blogspot.com/2012/01/custom-upload-form-for-document-library.html

Update

It looks like the upload page property is associated with the SPWeb not the SPList object per: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.customuploadpage(v=office.14).aspx?cs-lang=csharp

  • The step7 is not answered completely on that post... Can you provide another direction? Thanks Bruno – user13209 Nov 26 '12 at 15:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.