I've created an XSLT file that runs through a SharePoint list to generate a table of resources. One part of it creates a link that goes off site. I'm wanting to have it open in a new window using target="_blank", but I'm unsure of how to do this in the XSLT.
Here's the portion that creates the link:
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:value-of select="Website"/>
</xsl:attribute>
<xsl:text>Visit Website</xsl:text>
</xsl:element>
Can anyone shed some light on this for me? I'm fairly new to working with XSLTs.
Will it work ?
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:value-of select="Website"/>
</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<xsl:text>Visit Website</xsl:text>
</xsl:element>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With