Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

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

share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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