$is-logged-in from Login info-event not registered
This is an open discussion with 2 replies, filed under XSLT.
Search
Check your params for $is-logged-in
.
Otherwise, just change $is-logged-in
to /data/events/login-info/@logged-in
You first need to declare the parameter before you can test it. First, give the parameter a value by declaring it at the beginning of your stylesheet or at the beginning of your template, depending on the scope desired for the parameter.
<xsl:template match="data"> <xsl:param name="is-logged-in" select="/data/events/login-info/@logged-in"/> <xsl:param name="username" select="/data/events/login-info/username"/> <xsl:if test="$is-logged-in = 'true'"> <xsl:text>You are currently logged in as </xsl:text> <xsl:value-of select="$username"/> </xsl:if> </xsl:template>
Create an account or sign in to comment.
I've the Login info-event attached to one of my pages. When I view the source for that rendered page, at the end I find the following data:
So far, so good. But then I add this code to one of the utilities to the page:
And suddenly I get an error message saying that $is-logged-in isn't registered. Why?