I have a the following site structure with each task count in brackets:
Site Collection
Site A (3)
Site A1 (1)
Site B (2)
Site B1 (1)
Site C (4)
Site C1 (2)
I would like to use a CQWP on the Site Collection homepage to basically show a count of all Tasks on the sub-site level (A,B,C). The standard query options only allows for recursive options that will include the lower levels of sites as well. Ideally, I would like to show the CQWP as follows:
Site A......................3
Site B......................2
Site C......................4
Firstly I thought I could use the WebsOverride property to turn recursive off, but then one would need a specific WebUrl for a site and there is no way to indicate specific site level in the WebUrl (such as ~site/~sitecollection). Since I want this for a specific level of sub-sites, this is not going to work. I have managed to do some XSL magic in order to determine the tasks level by simply looking up the amount of "/" in the FileDirRef string property of the task and could then use that to identify the "site level". By using <xsl:if> I could "filter" out those ones on the lower levels. I agree this is probably the dirtiest solution ever! But is does work....to a point. When then applying a group by "<site>" to the CQWP displays the site names for those that I have filtered out since I did not really change the query.
Question1: How could one modify the query to only show items from a specific subsite level?
Question2: How would one only display the count value of items (tasks) per site?
Dirk Prinsloo