0
votes
<xsl:template match="*"> 
<xsl:variable name="ids" select="concat(sc:fld('MyMultilist',.)'|')"/> 
<xsl:call-template name="PrintTitles">   
<xsl:with-param name="ids" select="$ids"/> 
</xsl:call-template>
</xsl:template>
<xsl:template name="PrintTitles">  
<xsl:param name="ids"/>  
<xsl:if test="$ids">    
<xsl:variable name="itm_id" select="substring-before($ids, '|')"/>    
<xsl:if test="$itm_id">      
<xsl:variable name="itm" select="sc:item($itm_id,.)"/>      
value : <xsl:value-of select="sc:fld('title', $itm)" br/>
</xsl:if>    
<xsl:call-template name="PrintTitles">      
<xsl:with-param name="ids" select="substring-after($ids, '|')"/>    
</xsl:call-template>  
</xsl:if>
</xsl:template>
</xsl:stylesheet>

We are able to retieve the GUIDs of the items from the above code but unable to print the title( Item Name ) of the particular selected item in the Multilist . In the following line of code trying to retrieve name of selected Item by GUID .

value : <xsl:value-of select="sc:fld('title', $itm)" br/>

Kindly Help.

1

1 Answers

0
votes

You get an item using sc:item XSL extension. Just get the item name from it like this:

<xsl:value-of select="sc:item($itm_id, .)/@name" />