After converting a list to XSLT dataview, I am having some problem with URLs inl lists, so I make it a little easy to use for editing XSLT.
To make this work, create a new list, and give it a fieldname of URL which is a link (href) type list object.
Here is a much better way to encode the a href tags:
<xsl:variable name="ThisURL" select="substring-before(@URL, ', ')" />
<xsl:variable name="ThisTitle" select="substring-after(@URL, ', ')" />
<xsl:if test="normalize-space($ThisTitle)!=''">
<div class="ms-vb2">
<A HREF="{$ThisURL}" title="{$ThisTitle}"><xsl:value-of select="$ThisTitle" /></A>
</div>
</xsl:if>
If you name the field something else like 'mylink' or something, just replace @URL in the code above with your fieldname.
Hope that help you.
Niciun comentariu:
Trimiteți un comentariu