Note that there are some explanatory texts on larger screens.

plurals
  1. POExtending Sharepoint XSL template
    primarykey
    data
    text
    <p>Thanks to <a href="https://stackoverflow.com/questions/940433/outputing-sharepoint-hyperlink-column-as-url">this post</a> I've come up with the following template:-</p> <pre><code>&lt;xsl:variable name="Doc"&gt; &lt;xsl:call-template name="OuterTemplate.GetTitle"&gt; &lt;xsl:with-param name="Title" select="@DocumentLink1"/&gt; &lt;/xsl:call-template&gt; &lt;/xsl:variable&gt; &lt;a href="{substring-before($Doc,',')}"&gt; &lt;xsl:value-of select="substring-after($Doc,',')" /&gt; &lt;/a&gt; </code></pre> <p>This template is nested in an unorderd list and li tag (see below). Since this code has a physical and visual presence in the html page when no content exists I would like to add the li tags and possibly the ul tags to the template. Can anyone tell me how to accomplish this? </p> <pre><code>&lt;ul&gt; &lt;li&gt; &lt;xsl:variable name="Doc"&gt; &lt;xsl:call-template name="OuterTemplate.GetTitle"&gt; &lt;xsl:with-param name="Title" select="@DocumentLink1"/&gt; &lt;/xsl:call-template&gt; &lt;/xsl:variable&gt; &lt;a href="{substring-before($Doc,',')}"&gt; &lt;xsl:value-of select="substring-after($Doc,',')"/&gt; &lt;/a&gt; &lt;/li&gt; &lt;li&gt; &lt;xsl:variable name="Doc"&gt; &lt;xsl:call-template name="OuterTemplate.GetTitle"&gt; &lt;xsl:with-param name="Title" select="@DocumentLink2"/&gt; &lt;/xsl:call-template&gt; &lt;/xsl:variable&gt; &lt;a href="{substring-before($Doc,',')}"&gt; &lt;xsl:value-of select="substring-after($Doc,',')"/&gt; &lt;/a&gt; &lt;/li&gt; &lt;li&gt; &lt;xsl:variable name="Doc"&gt; &lt;xsl:call-template name="OuterTemplate.GetTitle"&gt; &lt;xsl:with-param name="Title" select="@DocumentLink3"/&gt; &lt;/xsl:call-template&gt; &lt;/xsl:variable&gt; &lt;a href="{substring-before($Doc,',')}"&gt; &lt;xsl:value-of select="substring-after($Doc,',')"/&gt; &lt;/a&gt; &lt;/li&gt; </code></pre> <p></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload