Pergunta

I have a webpartpage with two CQWPs. I want the first to show all pages for the current site, and I want the second to show all pages for the subsites of the current site.

As I can see, there's no way of excluding the current site's pages in the second CQWP OOTB, but is there a way to filter e.g. in the xslt?

I'm deploying the webparts through a feature, and I have full control of the webparts properties and xslt.

Foi útil?

Solução

Solved this using xslt. Used the 'trick' described here to get the current page. I then found the current sitename from this url. I then appended '/Pages' to the current site's name, and for alle the returned pages I checked if there LinkUrl-field contiained currentsite/Pages, and did not show them id they did.

Not an optimal solution of course. This will for instance not work if you have subsites with the same urlname as the CQWP-site.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a sharepoint.stackexchange
scroll top