开发者

url gets appended in href

开发者 https://www.devze.com 2023-01-13 03:47 出处:网络
--> Now the page path gets append开发者_运维问答ed to the externalurl value like: http://www.site.com/pages/www.externalurl.com

-->

Now the page path gets append开发者_运维问答ed to the externalurl value like:

http://www.site.com/pages/www.externalurl.com

I just want to set www.externalurl.com to the href. How do I do this? Thanks.


I think you need this:

<xsl:attribute name="href">
  <xsl:if test="not(contains(externalurl, '://'))">http://</xsl:if>
  <xsl:value-of select="externalurl" />
</xsl:attribute>
0

精彩评论

暂无评论...
验证码 换一张
取 消