简体   繁体   English

如何更改SharePoint中特定文档库的上传页面?

[英]How do I change the upload page for a particular document library in SharePoint?

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? 有任何想法吗?

Use a custom action feature to amend the toolbar. 使用自定义操作功能来修改工具栏。 The following attributes should override the default (reference: rendering template ToolbarUploadMenu in DefaultTemplates.ascx): 以下属性应覆盖默认值(参考:DefaultTemplates.ascx中的呈现模板ToolbarUploadMenu):

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. 如果上述方法不起作用,请仍然使用自定义操作添加新的工具栏按钮,但使用JavaScript隐藏现有的上传内容。 Here's a (verbose) example to hide the Upload using jQuery: 这是一个(详细的)示例,用于使用jQuery隐藏Upload:

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. 请注意,将来的SharePoint修订版可能会破坏此JavaScript,并且不会像第一个解决方案那样有效或优雅。

Maybe you will find my solution somehow useful - Custom upload form for document library in SharePoint 2010 - programmatic approach . 也许您会发现我的解决方案很有用-SharePoint 2010中针对文档库的自定义上传表单-编程方法 It's a full programmatic server side solution, it does not require any javascript tricks, it can be applied selectively to specific Document Libraries based on custom list templates (no need to change the default behaviour on entire WFE) and it is quite simple. 这是一个完整的程序化服务器端解决方案,它不需要任何JavaScript技巧,可以基于自定义列表模板有选择地应用于特定的文档库(无需更改整个WFE的默认行为),并且非常简单。

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. 它描述了如何创建自己的upload.aspx,但是简要地看一下文章,这将更改所有库的上传位置。 You might want to create your own doc lib tempalte and associate the new3 upload page with that specific upload page . 您可能需要创建自己的doc lib tempalte,并将new3上传页面与该特定的上传页面相关联。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用 android 将文档上传到 SharePoint? - How do I upload a document to SharePoint with android? 如何使用Java将文档上载到SharePoint? - How do I upload a document to SharePoint with Java? 如何将文件上传到 sharepoint 中的文档库? - How do you upload a file to a document library in sharepoint? 如何将文档从Sharepoint文档库返回给用户? - How do I return a document from a Sharepoint Document library to the user? 如何将文件上传到Sharepoint中的文档库? - How to upload a file to a document library in sharepoint? 如何将电子邮件自动上传到 sharepoint 文档库? - How to upload emails to sharepoint document library automatically? 使用IRM将文档上载到SharePoint库 - Upload a document into a SharePoint library with IRM Sharepoint 2013:如何从术语库中为文档库中的所有现有文件设置不同/更改术语? - Sharepoint 2013: How do I set a different/change term for all existing files in a document library from the term store? 如何使用Sharepoint API检查Sharepoint文档库是否设置了Require Approval标志? - How do I check if a Sharepoint Document Library has the Require Approval flag set, using the Sharepoint API? 如何使用Perl将文档上载到SharePoint? - How can I upload a document to SharePoint with Perl?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM