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>
	</xsl:variable>

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

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

Hi,

Here you go go

https://tommdaly.wordpress.com/2014/04/01/content-query-web-part-calendar-mad-problems/

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

Hi,

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

http://msdn.microsoft.com/en-us/library/office/hh185011(v=office.14).aspx     

Common Programming Tasks in the JavaScript Object Model

http://msdn.microsoft.com/en-us/library/office/hh185015(v=office.14).aspx

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

http://blogs.msdn.com/b/sharepointdev/archive/2011/04/14/using-the-javascript-object-model-in-a-content-editor-web-part.aspx

Thanks 

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