Filter with xslt and multinode tree picker challenge
Hey xslt experts,
i'm in no way very handy with xslt so here is my challenge..
I have a page where i have 2 dropdowns which are filters for category and location. They work through the querystring parameter and i get them like this.
Now i have vacancy pages below my currentPage. Every Vacancy page has 2 MNTP. One for 'category' and one for 'location'. So cat en loc are Id's. ( querystring example ?cat=1495&loc=0)
Now i want to loop through all my vacancy Pages (docType is VacancyPage) and return only the set of VacancyPage pages, that match the querystring parameters with the NodeId's from the VacancyPage MNTP's.
I tried the code below, but i think the MNTP don't loop through multiple NodeId in them or something. In the code below 'functionCategory and loctionCategory are my MNTP properties of the VacancyPage.
<xsl:variablename="results"select="$currentPage/VacancyPage[./functionCategory/MultiNodePicker//nodeId = $category or ./locationCategory/MultiNodePicker//nodeId = $location]"/>
The idea is that i get a node-set of the VacancyPages that match the category and location filters, because i need that on some paging mechanism as well..
Since my xslt isnt that great, i'm thinking of going to c# to do it there with the API and return it back to XSLT.
But i thought let me try it here, maybe some of you has a better idea how to get this done properly..
Filter with xslt and multinode tree picker challenge
Hey xslt experts,
i'm in no way very handy with xslt so here is my challenge..
I have a page where i have 2 dropdowns which are filters for category and location. They work through the querystring parameter and i get them like this.
Now i have vacancy pages below my currentPage. Every Vacancy page has 2 MNTP. One for 'category' and one for 'location'. So cat en loc are Id's. ( querystring example ?cat=1495&loc=0)
Now i want to loop through all my vacancy Pages (docType is VacancyPage) and return only the set of VacancyPage pages, that match the querystring parameters with the NodeId's from the VacancyPage MNTP's.
I tried the code below, but i think the MNTP don't loop through multiple NodeId in them or something. In the code below 'functionCategory and loctionCategory are my MNTP properties of the VacancyPage.
The idea is that i get a node-set of the VacancyPages that match the category and location filters, because i need that on some paging mechanism as well..
Since my xslt isnt that great, i'm thinking of going to c# to do it there with the API and return it back to XSLT.
But i thought let me try it here, maybe some of you has a better idea how to get this done properly..
Thanks in Advance...
Wiske
Hi Wiske80,
I'd try to split them up like this:
If that doesn't help, you can try to do a separate <xsl:copy-of /> for each variable and see what gets selected ...
/Chriztian
thanks Chriztian again for your help... this pointed me in the right direction
is working on a reply...