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
Hi,
I would like to open link in a new window.I have attached the XSLT code below.
I would like to open only
<xsl:when test="pText!=''"> <xsl:value-of select="pText" /> </xsl:when>
in new window.
Pls help me ASAP.
<a > <xsl:attribute name ="href"> <xsl:choose> <xsl:when test="pText!=''"> <xsl:value-of select="pText" /> </xsl:when> <xsl:otherwise> <xsl:value-of select="umbraco.library:NiceUrl(pLink)" /> </xsl:otherwise> </xsl:choose> </xsl:attribute> <img src="{uploadPhoto}" alt="{@nodeName}"/> </a>
Hi Anju,
You can do that like this:
<a href="{umbraco.library:NiceUrl(pLink)}"> <xsl:if test="normalize-space(pText)"> <!-- Override the href attribute --> <xsl:attribute name="href"> <xsl:value-of select="pText" /> </xsl:attribute> <!-- Add a target attribute --> <xsl:attribute name="target">_blank</xsl:attribute> </xsl:if> <img src="{uploadPhoto}" alt="{@nodeName}" /> </a>
/Chriztian
Can I able to do like this? But now it is not redirecting.
<xsl:when test="pText!=''"> <a target="_blank"> <xsl:attribute name="href"> <xsl:value-of select="pText" /> </xsl:attribute> </a> </xsl:when>
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
XSLT open in new window
Hi,
I would like to open link in a new window.I have attached the XSLT code below.
I would like to open only
<xsl:when test="pText!=''">
<xsl:value-of select="pText" />
</xsl:when>
in new window.
Pls help me ASAP.
<a >
<xsl:attribute name ="href">
<xsl:choose>
<xsl:when test="pText!=''">
<xsl:value-of select="pText" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="umbraco.library:NiceUrl(pLink)" />
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<img src="{uploadPhoto}" alt="{@nodeName}"/>
</a>
Hi Anju,
You can do that like this:
/Chriztian
Can I able to do like this? But now it is not redirecting.
<xsl:when test="pText!=''">
<a target="_blank">
<xsl:attribute name="href">
<xsl:value-of select="pText" />
</xsl:attribute>
</a>
</xsl:when>
is working on a reply...