Im about to update a Umbraco 4.0 to 4.7 on a 3rd party solution and ive encountered some select problems.
For unknown reasons the developer have made a tab for each language and then gave the nodes different names (eg. PageName, PageName_en and PageName_de)
concat('PageName', $flang) outputs PageName_de
Using a concat i can get the right nodename, but i cant get it to select the right data.
Multiple variables in select
Hi guys
Im about to update a Umbraco 4.0 to 4.7 on a 3rd party solution and ive encountered some select problems.
For unknown reasons the developer have made a tab for each language and then gave the nodes different names (eg. PageName, PageName_en and PageName_de)
concat('PageName', $flang) outputs PageName_de
Using a concat i can get the right nodename, but i cant get it to select the right data.
I would like to make a select statement like
<xsl:variable name="pageName">
<xsl:value-of select="$parent[concat('PageName', $flang)]"/>
</xsl:variable>
<xsl:value-of select="$parent/$pageName"/>
But XSL does not like two variables placed like that.
How do i fix it?
Thanks
Kim
Hi Kim,
The XPath expression can not evaluate the variable's value as a node-set, so instead you need to do something like this...
Cheers, Lee.
Ah, perfect
Thank you :)
is working on a reply...