with regards to the varying number of filters (or filter types): you should have a default value vor each of these which you apply to them if there is no value provided. So let's say you can handle 5 filters filter1-filter5, you would then create 5 variables in your xsl script and do for each of them something like
Querystring - multiple values for single key
I am creating a custom search using querystring and xslt for-each to list the results.
I am unsure how I would go about manipulating multiple values for a single key in xslt.
Example: single key is foodtype, multiple values are Italian, Indian, Thai...
example.com?foodtype=Italian&foodtype=Indian&foodtype=Thai
Now the below xslt returns a comma separated string of all that keys values; Italian,Indian,Thai .
How can I separate this varying number of values into XSLT variables so I can use them in my for-each filter??
Also, there will be a varying number of filters, so how could I manage that?
These posts got me started, but am now stuck on the above issue.
http://our.umbraco.org/forum/developers/xslt/6751-Search-based-on-dropdowns-using-XSLT?p=0
Thanks
Hi Andy
Maybe you can have a look at the Split-extension. This extension creates some new XML that you can use afterwards. Like this:
The above variable would then contain the following XML:
I hope this can help you out somehow :)
/Kim A
Hi Andy,
with regards to the varying number of filters (or filter types): you should have a default value vor each of these which you apply to them if there is no value provided. So let's say you can handle 5 filters filter1-filter5, you would then create 5 variables in your xsl script and do for each of them something like
Hope that makes sense and helps,
Sascha
is working on a reply...