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?
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?
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
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 .
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.