Test url parameter with dynamic parts in its name?
This is an open discussion with 2 replies, filed under XSLT.
Search
You can't build references to parameter names dynamically, but if you're using 2.2+ the params are also at the top of your page XML so can be accessed with XPath:
/data/params/*[name()=concat('url-', value)]
Or something to that effect :-)
Ah, stupid me! You're so good with the xpath, Thank you!
Create an account or sign in to comment.
Please, can you give me a hand with the following XSLT:
I have a filter form with dynamically generated radio options. Do you have any ideas on how to make the form remember the selected radios when filter is returned?
I tried this:
but this is testing the variable value. Also tried this:
but it doesn't work.
The only solution I can get to work is test by each
$url-parameter
manually, but then rendering the options dynamically becomes useless. I'd be grateful if you can give me any suggestions.PS. I don't want to clutter the post with all of the code, because the filter is working correctly, only the above part is giving me a hard time. I'll post more if necessary.