Displaying Data from Parent Site in a Subsite (ListView WebPart)

Well, its not that difficult to display some data from a parent site in a subsite of sharepoint.

My requirement was to display the parent site list data as a ListView WebPart in a subsite in such a way that the links in the webpart(ListFromView) such as Item Title and Title of webpart should navigate back to the Custom list in the parent site.

Leaving behind the designer approach (truth is ...my company didn't allow that)
I thought to move the ListFormView view webpart from parent site to the subsite using webpart export and import.

Steps I followed:

1. Add a ListView Webpart for your list(parent list) in any page of your Parent site. (What I mean is Just click on Add Webpart in webpart zone and select the list that you want to display).

2. After adding the WebPart, click on little down arrow to edit the webpart (or modify shared webpart)and click the last option i.e "Export". Save it on your local machine.

3. Now Go to your Subsite Page and if its a Publshing portal, click on Page menu at left top of the Page and go to Import -> webparts.

4. Now you will see a new window on right hand side of your page where you can browse the saved webpart(step #2 one) and click on Upload.

5. Once You click the upload you will see the webpart under the browse option that you can simply drag and drop on your page.

6. So now we have added the webpart with all links from parent site, lets connect the webpart Title to its original Parent list. You can simply do this using a title url property of the webpart. Just add the relative url for the parent site list there and your Done!.

If you want to add one of the columns from a Parent site list in a subsite list the then you should follow the below :

1. Create a site column. - In parent Site Go to Settings -> Site Column. Here Create a new site column and choose the type as Lookup. Get the Lookup Information from Another list and Select your Parent list and its realted Column.

2. Add site Column in your Subsite's list -
Now go to your subsite list and goto list settings. Under Columns add a existing site column and select the above created custom column.

5 comments:

  1. Hey Isha,
    thanks for the tip. Unfortunately when I click on the edit arrow I don't get an Export option. Are you using MOSS 2007, or have you upgraded to 2010?

    FYI: I'm on MOSS 2007. One thing I spotted which may be related is selecting Modify Shared Web Part and heading to Advanced, there's an option to configure the Import Error Message, which defaults to "Cannot import this Web Part.". If you have any thoughts on what the issue could be, they'd be much appreciated.

    Thanks in advance,

    JB

    ReplyDelete
  2. This doesn't work, when trying to import it complains that the list doesn't exists on the child web site. It's not linked to the parent, it tries to find the list on the current site.

    ReplyDelete
  3. Would this work with a discussion list?

    ReplyDelete
  4. hey check this new website www.countcode.com. It's a social network made for programmers, where you can download,share or upload source codes, where you can count your own code lines for free. You have access to the web forum and the web chatroom. we are happy to have you joined to our community!

    ReplyDelete

Disclaimer

This is a personal weblog. The opinions expressed here represent my own and not those of my employer or anyone else. Should you have any questions or concerns please e-mail me at sharepointprogrammingblogger@gmail.com .

Copyright (c) 2010 @ myshaepointwork.blogspot.com. All rights are reserved.Do Not Copy.

@ Learning SharePoint.com