Child objects within SharePoint, like a list in a Site, share an inherent connection with that Parent object. Today's blog is regarding the usage of one SharePoint object like a list and how we can project that list into other locations.

Now in the example here, the Engineering department wanted to create an interactive and collaborative list based around ideas for their weekly Monday night meeting and they want it to be easily accessible from the Engineering home landing page. The Discussion Board List template was an ideal match for this request and the list can be displayed on the landing page by editing it and adding the List View Web Part.

You can see it has been created underneath the Engineering site which itself is in a political site hierarchy design along with HR, IT, Projects, etc. underneath the parent Site Collection called Synergy Alternative Power. Traditionally, this list could be viewed here and/or displayed in a List View Web Part on the landing page of the Engineering site as shown here :

The issue with the List View Web Part is that it can only display List or Library content from the current Site Parent and below, ie - where are we right now? We're in the Engineering landing home page therefore we only have access to the lists and libraries (or objects) that reside underneath the Engineering site or parent object.

Now management have decided that the other departments will join the Engineering meeting and form a weekly Company meeting. The managers would like the Meeting Discussion Board displayed in a Web Part on the IT site landing page as well so that the IT department can view and add their own ideas.

Here a decision needs to be made from management and/or key stakeholders:

· Do we maintain one list or multiple lists? A very common question as SharePoint Administrators/Designers we need to ask our clients and one that I'm faced with very often. Either is acceptable but one may be easier to secure, maintain or implement. If you choose to maintain one list then the following procedure will assist you. If you decide each department should maintain there own meeting ideas then I will attempt to cover this in my next blog. In that solution we need to aggregate data from multiple lists into one Web part should the need ever arise to collate all data.

While there are many different ways and web parts to achieve this in SharePoint 2010 I'm going to share the best way I've found to accomplish this and that is to save the List View Web Part of the List into the SharePoint Web Part Gallery for reuse. Here's how:

· Go to the page in which your Web Part resides, in this case the Engineering landing page.

· Edit in SharePoint Designer (SPD) from the Site Action menu. If SPD is not installed the option will still be in the Site Action menu and you will be prompted to download and install it.

Now you have two options here in SPD. You can either:

· Click Lists and Libraries on the Left Hand Navigation Pane

· Select your List or Library and then click on the default view from the Right Hand Side Views section

Or

As my list already appears in my Engineering homepage in a Web Part I can simply

· Click 'Edit Site home page'

· Now wait for the page to load in editing mode and highlight the Web Part you would like to distribute

· You will notice the List View Tools in green highlighted up in the Ribbon. Underneath this is four tabbed sections

· Select the Web Part tab

· On the far right hand side of the ribbon you have two options. 'To Site Gallery' and 'To File'.

· Click on 'To Site Gallery'

Note: It's a good idea to Name the Web Part without spaces otherwise %20 will appear instead of the space wherever you use it. It's good practice to avoid spaces as much as possible in SP.

· Before saving to the Site Collection Web part Gallery you have the option of editing the web part before doing so by clicking Set Properties.

· If you're happy with them Click Ok

· After you click Ok a very important message appears in relation to what I was discussing in my introduction.

It asks Do you want the Web Part to always show List Data from the current Web Site (ie - the Engineering Site where the list resides)?

Or

Do you want the Web Part to show data from the list at the Site at which you place this Web Part?

In this case we will almost always Click Yes for our purposes but of course you have the option of utilizing separate Lists and List templates, etc.

· After clicking Yes you can now close SPD. We did not edit anything in SPD only use its functionalities to have access to the Edit View and Web part exporting options.

· Now go back to your Site Collection Home Page, in this case Synergy Alternative Power

· Click on Site Actions then Site Settings

· Underneath the Galleries section click Web Parts

· Your Web Part should now be available to the rest of your Sites in your Site Collection as it now resides in the Site Collection Web Part Gallery

Let's test it out by complying with the IT department's request to have the Meeting Ideas Web Part added to their Home landing page as well

· Navigate to another Site in your Site Collection

· Click Site Actions then Edit Page or Edit Page icon above the ribbon

· Click in the editable Web Zone where you would like to place the Web Part

· Click the Insert tab under the Editing Tools in the ribbon

· Click Web Part

· Under Web Part Categories there should now be a new Category called 'Miscellaneous' that will contain any newly submitted items into the Web Part Gallery

· Click Add

· Click the Disk Icon above the Ribbon to save the page

Now if you get an error with any type of List or Library at this stage which I did (purposely of course :p) you will get the following error:

When this occurs you need to Click on the Link on the page 'Web Parts Maintenance Page' to resolve the error. In this case there are two XSLT List View Web Parts and one of them has a conflict. Our newly created one needs to be deleted So highlight it and click the Delete option. To return to the page click Go Back to Web Part Page.

TIP: If you ever need to go to the 'Web Parts Maintenance Page' simply add '?contents=1' (without the single quotation marks) at the end of the url in the address bar.

So why did this occur? You see there is a very important caveat to this whole process and one I discovered the hard way.

CAVEAT: Do not enable Management of Content Types on any List or Library you wish to Export or display on an external Site from the one in which it was created.

Now this did happen to me with this particular List as Management of Content Types is enabled by default. Most lists will not but very often when you want to alter content types this needs to be switched on so that you can. If this is the case and you still want to display the List elsewhere, don't alter the content type, instead attempt to create a new one, eg. Column content type.

· To resolve this we need to go back to our Site Collection Web Part Gallery and delete the custom Web Part we created.

· Then we need to make sure Management of Content Types is not enabled. There are a few ways to do this.

- The easiest is in SPD. In SPD go to your List and under Settings-> Advanced Settings un-tick Allow Management of Content Types as shown below:

- The other method is to navigate to the List Settings, click Advanced Settings and click No next to Allow management of content types? Then click ok.

· The Final Step is to proceed with the solution above all over again. Yes it's frustrating when you find out that Content types is on so it's a good idea to check beforehand and also inform the Site\List administrator of this issue as well.

The IT Site landing page will then have the list web part and both are updated as changes are made as it is pointing to the same original list.

Displaying SharePoint Lists or Libraries in other sites 显示其他站点的List的更多相关文章

  1. SharePoint自动化系列——通过PowerShell创建SharePoint Lists

    转载请注明出自天外归云的博客园:http://www.cnblogs.com/LanTianYou/ 代码如下(保存到本地ps1文件中,右键run with PowerShell即可): Add-PS ...

  2. SharePoint 2013技巧分享系列 - 同步Exchange显示高清用户照片

    在“SharePoint 2013技巧分享系列 - Active Directory同步显示用户照片”文中介绍了如何同步Active Directory显示用户照片,但是同步完成后,用户照片尺寸和清晰 ...

  3. SharePoint 2013 Service 状态无法启动,显示“启动中(Starting)”

    Problem 在SharePoint 2013 Central Administration中启动 SharePoint Service(也称为:Service Machine Instance)时 ...

  4. SharePoint Iframe 报错“此内容不能显示在一个框架中”<续>

    在之前的SharePoint站点iframe引用中,我们遇到过下面的问题,就是其它系统或者不通环境的SharePoint站点,引用SharePoint页面会报错“此内容不能显示在一个框架中”,之前我们 ...

  5. SharePoint Iframe 报错“此内容不能显示在一个框架中”

    问题描述 我们SharePoint站点用Excel Service发布的Excel,需要Iframe到其他系统中,但是,Iframe的时候发现报错“此内容不能显示在一个框架中”. 后来,尝试在其他系统 ...

  6. [SharePoint Online]SharePoint Designer无法打开世纪互联版sp online站点得解决方法,报错信息:请安装更新后再重新打开

    现象描述: 装了个x64版SharePoint designer 2013, 没有装SP1,在打开国际版得office 365 online得时候完全没有问题,但是在打开世纪互联版得时候就打不开,让安 ...

  7. Sharepoint 2013内容查询Web部件自定义显示样式(实战)

    分享人:广州华软 星尘 一. 前言 在进行Sharepoint开发时,经常会遇到内容展示个性化需求的问题,当然如果通过自定义开发控件对于内容展示的需求基本都可以很好的解决,但自定义开发也有不好的地方, ...

  8. 在 SharePoint 2010 打开网页出错时,显示实际的错误信息

    每次打开错误页面时,SharePoint出错显示的都是友好信息“发生意外错误”,而且友好到您基本上无法明白到底出什么错,怎么办? 修改Web.config文件配置就可以了,就可以显示更详细的信息: 1 ...

  9. SharePoint Server 2013 Excel Web Access无法显示

    环境信息:SharePoint Server 2013 中文版,版本为15.0.4420.1017 Windows Server 2008 r2中文版 Sql Server 2012 问题描述:在Sh ...

随机推荐

  1. 安卓开发笔记——重识Activity

    Activity并不是什么新鲜的东西,老生常谈,这里只是随笔记录一些笔记. 每当说起Activity,感觉最关注的还是它的生命周期,因为要使我们的应用程序更加健壮,客户体验更加良好,如果对生命周期不熟 ...

  2. 让我们一起Go(九)

    前言: 又好久么更新了,无奈公司项目多,自己又接了私活,于是时间更不够了......不过我是不会让它流产的,坚持! 一.Go语言中的函数 终于轮到函数了,其实也没有什么好说的,无非就是一个语法问题,c ...

  3. Android 优化布局层次结构

    前面介绍过使用HierarchyViewer和Android lint来优化我们的程序,这一篇算是总结性的,借助一个小例子来说用怎么优化应用布局.这个例子是android官网给出的,作者也当一把翻译. ...

  4. c++中基类与派生类中隐含的this指针的分析

    先不要看结果,看一下你是否真正了解了this指针? #include<iostream> using namespace std; class Parent{ public: int x; ...

  5. [IR] Tolerant Retrieval & Spelling Correction & Language Model

    Dictionary不一定是个list,它可以是多种形式. 放弃Hash的原因: 通常,tree是比较适合的结构. From: http://www.cnblogs.com/v-July-v/arch ...

  6. webapp,liveapp: 流式布局和rem布局

    liveapp场景应用,一般针对的是移动端,近来也是很火,颇有一些感受,拿来分享一下. 页面宽度范围: 一般移动端页面我们的像素范围是320px-640px,最大640px,最小320px,所以设计稿 ...

  7. LeetCode——Find the Duplicate Number

    Description: Given an array nums containing n + 1 integers where each integer is between 1 and n (in ...

  8. java基础---->java中正则表达式二

    跟正则表达式相关的类有:Pattern.Matcher和String.今天我们就开始Java中正则表达式的学习. Pattern和Matcher的理解 一.正则表达式的使用方法 一般推荐使用的方式如下 ...

  9. IOS学习笔记之 Socket 编程

    最近开始静心学习IOS编程,虽然起步有点晚,但有句话说的好:“如果想去做,任何时候都不晚”.所以在今天,开始好好学习IOS.(本人之前4年都是搞.Net的,java也培训过一年) 打算学IOS,从哪入 ...

  10. SQL Server中中数据行批量插入脚本的存储实现

        看到博友SQL Server MVP桦仔的一篇博文“将表里的数据批量生成INSERT语句的存储过程的实现”.我仔细看来博文中的两个存储代码,自我感觉两个都不太满意,都是生成的单行模式的插入,数 ...