0
我試圖獲取頁面的文本字符串的值,爲它分配一個URL,然後使用xslt在不同的頁面上顯示結果。我不確定如何獲得文本字符串的值。Umbraco - 獲取文本字符串值
這裏是我的宏:
<!-- Input the related links property alias here -->
<xsl:variable name="fieldName" select="/macro/fieldName"/>
<xsl:template match="/">
<xsl:if test="$fieldName != ''">
<!-- The fun starts here -->
<xsl:element name="a">
<xsl:if test="./new-window[. = 'True']">
<xsl:attribute name="target">_blank</xsl:attribute>
</xsl:if>
<xsl:attribute name="href">
<xsl:value-of select="/myUrl.aspx"/>
</xsl:attribute>
<xsl:value-of select="./@title"/>
</xsl:element>
</xsl:if>
</xsl:template>
</xsl:stylesheet>