I am building a corporate intranet with a totally custom design and need to use CWQP in order to pull data from lists (home page carousel and quick links) and subsites (news article rollups etc).

Pretty much every online resource I find mentions dropping the CQWP on a page and then exporting, make changes and the re-import.

Am I correct in thinking that this is only if I want to build re-usable web parts where the content author won't need to configure the query, just drop the component in and publish?

As my templates are quite static, is it ok/best practice to just use Sharepoint designer and drop a CQWP into a page layout (home page layout for example) and not in an editable web part region?

1 Answer 1


You only need to export/edit/import the CQWP if you want to change settings that are not accessible via SharePoint Designer, or if you find it easier to read/edit in the exported web part. Most settings can be adjusted in SharePoint Designer, but some stuff is simply easier to edit when the web part is open in a text editor. It depends on how familiar you are with the user interface and code view in SPD.

When I build things like that I like to create the CQWP in a web part page and get it as far as possible there. Export and edit if I need other parameters. Re-import into a(nother) web part page to test and when I'm happy with it I put it into the destination page.

In some situations it does indeed make sense to put the CQWP into the page layout instead of editable web part zones. Importing a CQWP into a page layout is not an option on the SPD ribbon, though. I have a write-up with steps here.

Ultimately, "OK" or "best practice" is what works best for you, not what others do.

Edit: my fingers got ahead of me and I initially wrote CEWP where I meant CQWP. Corrected now.

  • Thanks teylyn. I am sure it doesn't matter but I was mentioning CQWP, not CEWP. There doesn't seem to be much documentation or examples out there of just using the PublishingWebControls:ContentByQueryWebPart tag and specifying MainXslLink, ItemXslink or HeaderXslLink attributes. Other than the MS doc - msdn.microsoft.com/en-us/library/… Have you successfully used it this way before? Aug 5, 2014 at 5:05
  • sorry, that was a typo on my part. I definitely mean the Content Query Web Part!!! I'll edit the post.
    – teylyn
    Aug 5, 2014 at 21:03
  • Yes. I use the CQWP a lot and have integrated it into non-editable regions of pages and page layouts. I do some edits in the Properties panel of SPD and others via the export/edit/import route, depending on what I want to achieve. And yes, the documentation leaves much to be desired.
    – teylyn
    Aug 5, 2014 at 21:06

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.