XSLT Define Global Counter Variable
-
Thursday, April 26, 2012 4:38 AM
I have define custom XSL for my CQWP. Now I want to control the number of items that are being displayed in CQWP through this XSL. For this I want to declare a global counter variable and increment this in my XSL. How can I achieve this?
Thanks
Engr. Mudassar Ali Software Engineer
All Replies
-
Saturday, April 28, 2012 11:24 AMJust a quick question, why do you want to control the number of items that are being displayed through XSL? Is it for an additional requirement like paging or something like that?
If you just want to limit the number of items you can also use the itemlimit property of the web part in the interface.
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.publishing.webcontrols.contentbyquerywebpart.itemlimit.aspx
-
Saturday, April 28, 2012 4:52 PM
ok let me explain my scenario.
By default CQWP gives 3 filters. But I have to apply four in which there is a filter name Active. Now I am displaying list items in CQWP and applying 'Active' filter in XSLT. Now if i have 5 items in a list in which first two are inactive and remaining are active then by setting itemlimit property to four gives me only two items because first two items are inactive.
How I can define a global variable to count number of items being displayed?
Engr. Mudassar Ali Software Engineer
-
Tuesday, May 08, 2012 5:25 PMAnyone here who can ans me?
Engr. Mudassar Ali Software Engineer

