简体   繁体   English

使用Web部件复制webpart页面(aspx页面)

[英]copy webpart page (aspx page) with web parts

I have a web part page "DocLib1.aspx" in document library "DobLib1" and it has few webparts. 我在文档库“DobLib1”中有一个Web部件页面“DocLib1.aspx”,它有很少的webparts。

How can I take the same web part page and copy it to other document libraries (there are about 50+ document libraries). 如何将相同的Web部件页面复制到其他文档库(大约有50多个文档库)。 The web part page is named after the document library (with aspx extension). Web部件页面以文档库(带有aspx扩展名)命名。 One of the web part is the list for the same doc lib where the web part is residing. 其中一个Web部件是Web部件所在的同一doc lib的列表。

This worked for me for SharePoint 2010: 这适用于SharePoint 2010:

  1. Open the site in SharePoint Designer 2010 SharePoint Designer 2010中打开该网站
  2. Right click the page and select copy. 右键单击页面并选择复制。
  3. Select a different folder 选择其他文件夹
  4. Rename the page 重命名页面
  5. Move it back to the original folder. 将其移回原始文件夹。

All the WebParts will be intact. 所有的WebParts都将完好无损。 This might seem elementary, but within SharePoint copying a page doesn't copy any of the WebPart on the page. 这似乎是基本的,但在SharePoint中复制页面不会复制页面上的任何WebPart。 That drove me bonkers. 这让我疯狂。 Hope this helps you. 希望这对你有所帮助。

There are two options to copy and paste a Sharepoint 2010 page and retain its web parts: 有两种方法可以复制和粘贴Sharepoint 2010页面并保留其Web部件:

  1. Perform the copy and paste through Sharepoint Designer 2010. 通过Sharepoint Designer 2010执行复制和粘贴。

  2. Access any page in Sharepoint Browser and go to Site Actions > Manage Content and Structure. 访问Sharepoint Browser中的任何页面,然后转到“站点操作”>“管理内容和结构”。 Copy and paste is possible from here but copy and paste within the same directory can fail; 可以从此处复制和粘贴,但在同一目录中复制和粘贴可能会失败; paste in a different directory level then rename the file. 粘贴到不同的目录级别,然后重命名该文件。

I came upon this site when also looking for a solution to copying a webpart page, but I actually found an even easier way. 我在寻找复制webpart页面的解决方案时遇到了这个网站,但实际上我找到了一种更简单的方法。 I've got a library that holds webpart pages, and whenever I need another page that is similar to one of the others in the library, I go to Library Tools > Library in the ribbon, and then Open with Explorer. 我有一个包含webpart页面的库,每当我需要另一个与库中其他页面类似的页面时,我会转到功能区中的Library Tools> Library,然后使用Explorer打开。 From there, I simply Copy/Paste the webpart page that is similar to what I want into the same library and then rename the page. 从那里,我只需将类似于我想要的webpart页面复制/粘贴到同一个库中,然后重命名该页面。 Then I can open the new page and make the needed changes. 然后我可以打开新页面并进行必要的更改。

To add my experience to qhawk's solution (I cant just add a comment directly under the solution as I have less than 50 rep) - in SharePoint Designer 2010, I had to go to Site Objects --> All Files --> then select the relevant Library which has the page you want to copy, copy it to another Library, eg Shared Documents, rename it there, copy it back, job done. 将我的经验添加到qhawk的解决方案中(我不能直接在解决方案下添加注释,因为我的代表少于50个) - 在SharePoint Designer 2010中,我不得不转到站点对象 - >所有文件 - >然后选择相关的图书馆,其中包含您要复制的页面,将其复制到另一个库,例如共享文档,在那里重命名,复制回来,完成工作。

I found that if I just selected Site Objects --> Lists and Libraries --> and chose my Library from there, it wouldnt list the actual items in the library to be able to copy them, not even in the Views or Forms box. 我发现,如果我刚刚选择了站点对象 - >列表和库 - >并从那里选择了我的库,它就不会列出库中的实际项目,以便能够复制它们,甚至不在“视图”或“表单”框中。 You have to go through the 'All Files' route. 你必须通过'所有文件'路线。

PS. PS。 I know this is an old thread, but I found this whilst trying to find the solution for this, and after finding qhawk's solution needed a little tweaking for me, thought I'd let others know incase someone else stumbles across this. 我知道这是一个老线程,但我发现这一点,同时试图找到解决方案,并在找到qhawk的解决方案后需要对我进行一些调整,以为我会让其他人知道,因为其他人偶然发现了这个问题。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM