Syntax for using param in a utility if statement?
This is an open discussion with 2 replies, filed under Troubleshooting.
Search
Never mind, guessed a couple more times and came up with:
<xsl:if test="$page-title = 'Home'">
Which works; leaving this thread for reference / future searchers looking how to add something to their Symphony homepage (or any other page using the $page-title parameter)
Just a quick note for posterity:
If you are in an <xsl:>
element, you should not need the curly braces (see Matt’s example above), but when you are in another element, such as an html element, you can use the curly braces, also known as ‘attribute value templates’ to output the value of a variable param, e.g.:
<a href='{$root}/{$page-title}' />
Create an account or sign in to comment.
This has to be trivial, but I couldn’t figure it out. I want to do something when the page-title parameter is ‘Home’. However, when I run the most obvious option:
I get this error: