show calendar category in content query web part

I have a CQWP showing my calendars for my site. I have it showing the title, time and location, I'm trying to get it to show the category and its not. I have added the following to my ItemStyle.xsl

 <xsl:variable name="Category">
		<xsl:value-of select="@Category"></xsl:value-of>

and showing it here
 <span class="category">
            Category: <xsl:value-of select="@Category" />

I have an event that I have a category selected, however, when I render the the page, that category section is blank.

In edit mode of the CQWP, I can see the {category} and I have that set to [Category].

Is there something I'm missing?

May 15th, 2015 11:45am


Here you go go

Free Windows Admin Tool Kit Click here and download it now
May 15th, 2015 12:05pm

that doesn't resovle my issue and I'm not exporting web part.
May 15th, 2015 12:29pm


If Lakshmanans suggestion cant be applied to your environment, as an alternative, I suggest you add some JavaScript to query the fields needed from specific Calendar lists with the help of JavaScript Client Object Model, it would be easier to query the fields you want.

With JavaScript Client Object Model, we can query items of specific list:

How to: Create, Update, and Delete List Items Using JavaScript     

Common Programming Tasks in the JavaScript Object Model

You can put the code in a Content Editor Web Part and insert into the page you want:


Patrick Liang

Free Windows Admin Tool Kit Click here and download it now
May 17th, 2015 11:13pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics