Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Umbraco外部URL重定向_Url_Xslt_External_Umbraco - Fatal编程技术网

Umbraco外部URL重定向

Umbraco外部URL重定向,url,xslt,external,umbraco,Url,Xslt,External,Umbraco,我已将textstring属性“externalURL”添加到我的Doctype中。我想在文本字符串中输入外部URL,并在导航中单击该链接时将该链接重定向到外部URL 但是,以下各项不起作用: <a> <xsl:attribute name="href"> <xsl:choose> <xsl:when test="string(externalUrl) != ''">

我已将textstring属性“externalURL”添加到我的Doctype中。我想在文本字符串中输入外部URL,并在导航中单击该链接时将该链接重定向到外部URL

但是,以下各项不起作用:

<a>
         <xsl:attribute name="href">
           <xsl:choose>
             <xsl:when test="string(externalUrl) != ''">
               <xsl:value-of select="externalUrl" />
             </xsl:when>
             <xsl:otherwise>
               <xsl:value-of select="umbraco.library:NiceUrl(@id)" />
             </xsl:otherwise>
           </xsl:choose>
         </xsl:attribute>
         <xsl:if test="descendant-or-self::*[@id = $currentPage/@id]">
           <xsl:attribute name="class">current</xsl:attribute>
         </xsl:if>
         <xsl:value-of select="@nodeName" />
       </a>


有人能帮忙吗?

一个简单的区分大小写的问题。我需要将“externalUrl”更改为“externalUrl”,以匹配我的属性类型。有时候这是最明显的事情。

JV10,您能分享完整的XSLT文件吗?我还正在为我的Umbraco站点添加一个外部url重定向。