F
F
FallenBlick2014-12-10 15:11:28
CMS
FallenBlick, 2014-12-10 15:11:28

How to output multiple property value in XSL in HostCMS 6?

There is a property "Possible colors" (xml tag - varint-color) with the checkbox "Allow multiple values ​​for the property", there is a list for this property with the values: black, red, white.
There is a product, when adding which 2 possible colors were chosen: black and white.
How to display all selected color options in xsl template?
I try like this:

<xsl:for-each select="varint-color">
<xsl:value-of disable-output-escaping="yes" select="property_value[tag_name='varint-color']/value"/></xsl:for-each>

Outputs nothing.
But like this:
<xsl:value-of disable-output-escaping="yes" select="property_value[tag_name='varint-color']/value"/>

Displays only the first option.
Help to understand please.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
FallenBlick, 2014-12-12
@FallenBlick

Here is the correct option

<xsl:for-each select="property_value[tag_name='varint-color']">
<xsl:value-of disable-output-escaping="yes" select="value"/>
</xsl:for-each>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question