views:

2019

answers:

3

For a particular document library I need to navigate to a custom page when I click on the upload button in the toolbar. For other libraries I need the default upload as it is.

Any ideas?

+2  A: 

You need to use sahrepoint designer to create a custom list view.

here are some links to get you going: http://office.microsoft.com/en-us/sharepointdesigner/HA101191111033.aspx

http://blah.winsmarts.com/2007-5-Customize%5Fthe%5F-and-quot;NewFormaspx-and-quot;%5Fpage%5Ffor%5Fa%5FSharePoint%5FList.aspx

Chris Jones
Just a nitpick, you need to create a custom list form for the upload form for the list, not a custom view.
OedipusPrime
EvilGoatBob your right sorry :)
Chris Jones
+1  A: 

Have a look at this article. It describes creating your own upload.aspx, but looking at the article briefly, this will change the upload location for ALL libraries. You might want to create your own doc lib tempalte and associate the new3 upload page with that specific upload page .

Colin
+1  A: 

Use a custom action feature to amend the toolbar. The following attributes should override the default (reference: rendering template ToolbarUploadMenu in DefaultTemplates.ascx):

Location="Microsoft.SharePoint.StandardMenu"
GroupId="UploadMenu"
ID="Upload"
Sequence="100"

To bind to your particular document library use a specific content type on it and reference that in the definition for the custom action.


If the above doesn't work, still add the new toolbar button with a custom action but hide the existing upload with JavaScript. Here's a (verbose) example to hide the Upload using jQuery:

var newMenuTd = $('td.ms-toolbar > span > table[id*=NewMenu]').closest('td.ms-toolbar');
var newMenuSeparator = $(newMenuTd).next();
var uploadTd = $('td.ms-toolbar > span > table[id*=UploadMenu]').closest('td.ms-toolbar');
var uploadSeparator = $(uploadTd).next();
if (uploadTd.length > 0) {
    newMenuSeparator.empty();
    newMenuTd.empty();
    uploadSeparator.empty();
    uploadTd.empty();
}

Note that future SharePoint revisions may break this JavaScript and it won't be as efficient or elegant as the first solution.

Alex Angas