I am customizing the ItemStyle.xsl in SPD2010 for a CQWP crawling a whole site collection. I need to use the current web as a variable.
I tried multiple options:
- Option #1 - use server variables in a similar way to what you do with a DVWP but I do not see where I would set up the block
Ref. http://sympmarc.com/2007/10/19/data-view-web-part-parameters-based-on-server-variables/
Option #2 - use the ddwrt namespace functions I have successfully added the namespace to the ItemStyle.xsl and it does work great to retreive the page URL
xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"
Ref. http://spyralout.com/2009/03/16/current-page-url-using-xsl-for-content-query-web-part/
However, when trying the same trick to retrieve Httphost, HttpVDir and other parameters, it simply didn't work (returned blank). Note: my SP website is using https...
- Option #3 - Use the parameter(s) defined in the ContentQueryMain.xsl It seems that I should be able to access the paramters defined there from the ItemStyle.xsl but I probably don't do it properly... Any help?