Yep sad but true - I am also guilty of not being able to let go of a work related challenege at the weekends . . .
I have been challenged with changing the XSLT search module to provide for multiple inputs (free text and checkboxes).
Thankfully I have nailed it and now applying some finishing touches.
Your suggestion unfortunately didn't solve the problem as the template didn't output anything (even static text), but your suggestion did make me go back and look at how I was passing the value into the template
... because it was in the 'select' attribute, the param is trying to resolve a node-set (or XPath expression). It doesn't know that it should treat the value as a text/string.
Use a variable within a variable
I am missing something obvious, so would appreciate someone highlighting the error of my ways:
Within a template I am setting a parameter as follows:
Then I am attempting to use the value as follows:
This doesn't work however if I hard code the value as follows it works fine.
Any suggestions ?
Thanks
Nigel
Hvae tried outputing your variable to make sure it actually has the value BannerGroups i.e.
<xsl:value-of select="$fieldToSearch" />
If that works then try
<xsl:value-of select="data [@alias=$fieldToSearch]" />
Working on a holiday? Must be raining there too :)
Hey Paul
Yep sad but true - I am also guilty of not being able to let go of a work related challenege at the weekends . . .
I have been challenged with changing the XSLT search module to provide for multiple inputs (free text and checkboxes).
Thankfully I have nailed it and now applying some finishing touches.
Your suggestion unfortunately didn't solve the problem as the template didn't output anything (even static text), but your suggestion did make me go back and look at how I was passing the value into the template
Previously I had this
Now I have this and it appears to be working fine
So thanks from a fellow kiwi - stay warm and dry !
Hi Nigel, just to throw my 2-pence worth in.
When you first tried to pass the value in the 'with-param'...
... because it was in the 'select' attribute, the param is trying to resolve a node-set (or XPath expression). It doesn't know that it should treat the value as a text/string.
In your second attempt...
The value is evaluated as a text/string - rather than a node-set or XPath expression.
If you really wanted to use the 'select' attribute, you could do the following...
... but since you already got it working, no worries.
Cheers, Lee.
Hi Lee
Thanks for that - slowly but surely I'll get my head around the nuances of Umbraco & XSLT.
It's lots of fun and causes lots of head scratching !
Cheers
Nigel
is working on a reply...