Retrieve items from a rendering parameter list field in XSLT using sc:SplitValue

You cannot sc:SplitFieldValue on a rendering parameter (e.g. a multilist of items) because that method takes a field name rather than a comma-delimited string of IDs. To split a rendering parameter string, use sc:SplitValue.

<xsl:for-each select="sc:SplitValue($testitems, '|')">
      <xsl:variable name="myitem" select="sc:item(text(),.)" />
      <xsl:value-of select="$myitem/@name"/>
</xsl:for-each>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s