开发者

url gets appended in href

-->

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜