Display a list from another site in a SharePoint page

Source: Internet
Author: User

For the convenience of the user, we will design the SharePoint site as a hierarchy and expect the user to see the content from the subsite on the home page. For example, you want to display the contents of a list on a parent site on the home page of a subsite. This demand looks commonplace, but it's not really easy.

To illustrate the convenience, I refer to the site where the list is located as the source site, and the site that needs to display WebPart is called the target site.

The idea is simple: Insert a list webpart on the page of the source Web site, export the WebPart, import the WebPart you just exported on the target site, and then insert the imported webpart on the page of the target site.

How to export a WebPart. First open the page, enter the editing mode, in the top right corner of WebPart has a small triangle, the point is a menu, there is a command "export", the page will pop up to save the WebPart file, first save it to the local.

What if there is no export command? See Restore Export XSLT List View WebPart

For a little episode, to be able to use the WebPart on other sites, you need to modify the files that come out. Open it in Notepad. Locate the <property name= "WebId" node, replacing the node content with the WebId of the source site. WebID can be obtained by using the following PowerShell script.

if (Get-pssnapin | Where {$_. Name-eq "Microsoft.SharePoint.PowerShell"})-eq $null)
{
    add-pssnapin Microsoft.SharePoint.PowerShell;
}
$web = Get-spweb Http://chenweifeng
Write-output $web. ID

To be able to select the WebPart that you just exported when you insert a WebPart, you need to upload the webpart you just exported to the Web Part gallery. The Web Part gallery address is/catalogs/wp/.

You can now insert a WebPart on any site in the same site collection!

After you insert it, you can also edit the WebPart.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.