0

I don't know what I am doing wrong but it is driving me mad.

I am searching through Blog Sites and displaying posts including the PostCategory.

I have exported the CQWP and updated viewcommonfields to include PostCategory,Lookup

I have edited the itemlist.xsl to display @PostCategory

When I use a CQWP on a single Posts list the PostCategory is displayed (show items from the following list). It doesn't seem to matter which posts list I choose, it works fine.

As soon as I change the query to Show Items from the Following Site and all subsites or Show items from all sites in this collection, the category is no longer displayed. I have tried typing allsorts into the Fields to Display under PostCategory, e.g. PostCategory, Category, Category [Custom Types], but all to no avail.

What am I doing wrong?

Thanks

Stewart.

1 Answers1

0

I'm not able to test it right now by myself, but try to use Guid instead of field name. For example I have similar case, but need to show post title for comment. I use

{a131e489-d3d6-4f0c-a152-a3beb89f12be},Lookup;

in CommonViewFields, and

<xsl:variable name="PostTitle">
    <xsl:value-of select="string(@_x007B_a131e489_x002D_d3d6_x002D_4f0c_x002D_a152_x002D_a3beb89f12be_x007D_)" />
</xsl:variable>

in XSL.

Also you can specify which lists in which sites should be queried by filling 'ListsOverride' and 'WebsOverride' properties of CQWP

http://www.glynblogs.com/2011/06/querying-specific-lists-with-the-content-query-web-part.html

Oleg Savelyev
  • 968
  • 2
  • 8
  • 12