Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hello friends!, I want to do is to check whether a given node exists. I mean for example, if I pass the id, then check if that node exists. Thank you!
Hi umbracocool,
There's a couple of ways, depending on what you're doing, but this one should be good:
<!-- Grab the node --> <xsl:variable name="node" select="umbraco.library:GetXmlNodeById(1200)" /> <!-- Output a wrapper if it exists --> <xsl:if test="not($node[error])"> <div class="starter"> <xsl:value-of select="$node/@nodeName" /> </div> </xsl:if>
/Chriztian
Thank you!, You're a genius brother God bless you!
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Check if there a node by id
Hello friends!, I want to do is to check whether a given node exists. I mean for example, if I pass the id, then check if that node exists. Thank you!
Hi umbracocool,
There's a couple of ways, depending on what you're doing, but this one should be good:
/Chriztian
Thank you!, You're a genius brother God bless you!
is working on a reply...