Skip Ribbon Commands
Skip to main content

Quick Launch

Todd Klindt's home page > Todd Klindt's Office 365 Admin Blog > Posts > How to use SharePoint Designer to display list data from subwebs
January 19
How to use SharePoint Designer to display list data from subwebs

Recently on Twitter someone was asking about displaying blog posts from a subweb on the parent. This is pretty easy to do with SharePoint Designer (SPD) and its unsung hero, the Data View Web Part (DVWP). Here is a quick set of directions to get someone started. Once the DVWP is created any number of great customizations can be made. I'll leave that up for someone smarter than me. I'm not that good with DVWPs or SPD.

The first step is to create a new web part page in the parent site. The easiest way is through the Web UI. Log in as someone that can add content. Click Site Actions > Create:

You want to create a new Web Part Page.

Give the page a name and choose a template. For this I'll choose Left Column. You also need to choose where to create this page. I'll choose the Shared Documents Document Library:

After the page has been created, open up the root site in SPD. If you don't already have it, download the free trial. If you're doing any kind of SharePoint work, you need SPD. After SPD is open, open your root site's Shared Documents library and open the blogs.aspx page. A web part page should open up for you. Click the web part zone where you want the DVWP to go to give it focus. In my example I'll be placing the web part in the Body Web Part Zone.

Now go to the menu bar and select Data View > Insert Data View…

On the right hand pane the Data Source Library will be opened up. By default this will show all of the data sources in the current web at the DVWP can consume. Since the data we want is in a different web, we need to add it to the library. To do that click Connect to another library on the bottom:

When the Manage Library dialog box comes up, click Add. Give the library a name that makes sense to you. In my case I named it Blog. Under location type the path to the subweb that has your content. If you have opened this web in SPD previously you can also use the Browse button to find it.

Click OK a couple of times to get back to the Data Source Library. Now at the bottom of the list is an entry for the library we just added. Click the plus sign to expand the library. Blog posts are in a list called "Posts" so expand SharePoint Lists and click Posts. You should see a screen like this:

When you click Show Data your screen will change and you'll see the content of that list. To create the DVWP, drag the "Row [1/x]" line over to the Web Part Zone where x is the number of posts in your Posts list.

SPD will churn a little as it creates the DVWP. Once it's created it should look something like this:

Right now it's not very useful. The HTML isn't rendered correctly because of security concerns. Fortunately it's easily fixed. Click the first body entry to give it focus. Then click the > on the right side. Change the "Format as:" setting to Rich Text:

You'll get a prompt warning of the security concerns. Click Yes to clear it. Now all your blog posts will be rendered correctly.

That's where I'll stop for now. You'll probably want to alter how the posts are displayed. The web part as nearly infinite customization options like paging, sorting, grouping, the list goes on. To access them click the > for the web part and see the options there. Once you've done that you can also edit the HyperLink for the Title column to link users directly to the blog post. If there's enough interest I may do a blog post on that.

Have fun,

tk

 

Comments

Thank you

Nice post. Thanks for the tip. It's very handy.
 on 1/19/2009 3:02 PM

What is my blog's URL?

Hi--I'm getting stuck at the part where you enter the URL in the "Collection Properties" ...have tried every permutation I can think of...help?

Mary (original "poser" of question)
 on 1/19/2009 5:39 PM

Re: What is my blog's URL? Edit

How in the world would I know what your blog's URL is? :) You need to give the URL to the web of your blog. In my case the site collection URL is http://www.toddklindt.com and the subweb of that that houses my blog is http://www.toddklindt.com/blog. Not sure how those URLs are situated for you.

tk
Todd KlindtNo presence information on 1/19/2009 7:28 PM

Love to see a follow up post!

Great post, that is extremely helpful!

I'm messing around with this a bit now and haven't had chance to do much customization yet, but I was wondering:

1.  Is it possible to aggregate data from multiple sub-lists in WSS 3?  Somehow join multiple data sources?

2.  Would it be possible to create a new column in a sub-list ("Display on top-site") and then if that column was checked that would be a filter/parameter criteria for the aggregate list to know if it should display that list item or not?

Basically to provide an aggregated calendar that displays multiple events from many sub-lists?

 on 1/20/2009 9:30 AM

Update combined list with another site

I have joined multiple web site lists together into one master with filters and layouts etc as required.  However, I have more lists I need to add to this master.  I have updated the linked sources and can view the data.  Now I need the data view web part to update with the additional data.  Is there a quick way of doing this or do I need to rebuild the web part with the new data source?
 on 2/3/2009 2:50 AM

Update combined list with another site - Part II

I have figured out the update for the combined list by adding new lists as a join to the initial combined linked source and not re-doing the initial linked sources.

However, if a user doesn't have access rights to any one list, you receive an access denied message, understandably.  Is there any way of having the lists link with a generic admin account but then still filtering the logged on user information?
 on 2/9/2009 2:27 AM

What about going the opposite direction?

What if I have a List that is at the site root and trying to link down to a sub-site?  Just the opposite of your example?
 on 4/6/2009 3:02 PM

Re: What about going the opposite direction?

Yup, you can do what you want to do. You can use a DVWP to display content from a parent web.

tk
Todd O. KlindtNo presence information on 4/7/2009 9:05 PM

List Data with filtering

Hello,

Nice to see your post.
I have a query. Suppose I have t sub sites each having one list in it ex:
http://abc:123/site1
http://abc:123/site2
Now i want to display the data from these 2 sites (each list) on the root site http://abc:123/ with some sort of filtering. then in this case what can be done and how should i do it. please try to answer soon. Its my assignment.

Thanks in advance
Sumeet Gandhi
 on 4/21/2009 9:08 AM

Link to list in another farm or on separate WSS

Does anyone here know if you can connect to a list on a separate WSS installation from a MOSS installation using sharepoint designer?
 on 5/8/2009 3:04 PM
1 - 10Next

Add Comment

Items on this list require content approval. Your submission will not appear in public views until approved by someone with proper rights. More information on content approval.

Title


Body *


Today's date *

Select a date from the calendar.
Please enter today's date so I know you are a real person

Twitter


Want a message when I reply to your comment? Put your Twitter handle here.

Attachments

 

 SysKit