Override existing node value
This is an open discussion with 2 replies, filed under General.
Search
Hi Alberto and welcome,
I solve this by using a named template for page-title
and call it as: <xsl:call-template name="page-title" />
This way I can override it per-Page by simply adding a <xsl:template name="page-title">…</xsl:template>
in the specific Page template and add different content.
This works for me, but there are more ways to do this. You could also have a bunch of <xsl:choose>…<xsl:when/>
statements :)
That was quick! Thank you. It worked like a charm.
Alberto
Create an account or sign in to comment.
Hi there,
this is my first post here, so: greetings! And, Symphony is great.
(this is not the right place for a bio, so let's get to the code)
I would like to ask: is there a way to override the value of a node?
For example, I have an utility called page-title.xsl (I'm using the html5 ensemble). Inside I have:
I know that the value of page-title is the value of a param node (it's in
data/params/page-title
. What is the right thing to do in order to override this value in my template (depending on the page)?Thank you in advance.
Alberto