Is it possible to show data from two lists in CQWP? I am having this site setup.

Department site
-project site 1
-project site 2
-project site 3
- ...

Every site is having a blog. I want to show the newest entries from the department page and only their own project site within every project site. The problem is that I only can chose a list or a top level list within CQWP so I can either only show the project site blog posts or all the blog posts.

Example: In project site 1 I want to see the blog posts from Department and project site 1. In project site 2 I want to see the blog posts from department and project site 2 etc.

4 Answers 4


I think Charles's idea is probably going to be the easist option and give you the most flexible result.

Using a linked datasurce will let you show the blog entries from the department site and a project site. As long as the blog list is named the same in each of the project sites you should be able to replace the ListId (which is generated when you create your DataView) with ListName. Then it will be reusable and all you need to do is export the DVWP and then use it on each of the project sites. The following links might help:

  • Thank you. I could not use Charles solution if you had not mentioned using listnames instead of listids since I am going to deploy this at site creation with feature stapling.
    – Anonymous
    Mar 9, 2010 at 8:00

Why don't you go select items with a specific Content Type instead. In this case the blog post CT.

  • How do you mean. Would i not have the same problem. I updated my post in order to describe my problem better
    – Anonymous
    Mar 7, 2010 at 14:18
  • Ok, now I get want you want to achieve. It does not look like a job for the CQWP. It could be solved with some jQuery magic and the RSS feeds, if you do not want to do some server-side coding. Mar 7, 2010 at 15:50

Could you use a DVWP (Data View Web Part) to display the data and then create a linked data source from your top level site and the relevant project site in SharePoint Designer?

More info on creating linked/merged data sources here: http://office.microsoft.com/en-us/sharepointdesigner/HA101154041033.aspx

I guess the downside here is going to be maintaining the DVWP across each project site.

  • Thank you, I used your solution in combination with Nicks, which makes it possible to use this method with feature stapling.
    – Anonymous
    Mar 9, 2010 at 7:58
  • Just goes to show you should add the extra detail. I had kind of assumed you would only use SPD for the design... Mar 9, 2010 at 9:11

You could a Project site column to each blog library and assign each posting to the Project number, then when you set the filter in the CQWP add the project site column value. this will keep postings from the other projects in the collection from showing up.

  • I like your idea.
    – Anonymous
    Mar 8, 2010 at 7:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.