S
S
spy452422017-11-10 16:56:41
Yandex Market Language
spy45242, 2017-11-10 16:56:41

How to display the value of a field with a composite type in yml in UMI CMS?

In UMI CMS, I'm trying to display the value of a field with a composite type in yml, I've already tried everything, the field is displayed empty.
Well, that is:
xsl:value-of select="properties/group[@name = 'catalog_option_props']/property[@name = 'color']/value" /
If you remove /value , then it displays the word "Color", with /value - empty.
In this case, the field with the "drop-down list" type is displayed without problems, for example:
xsl:value-of select=".//property[@name = 'batman']/value/item/@name"

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
i, 2017-11-13
@ilyarsoftware

Look at: "Displaying the third column for a field of type Composite" , it should become clear how to work with a field of this type.

S
spy45242, 2017-11-14
@spy45242

Maybe someone will come in handy.
I did it a little differently. Customized a piece of the product card template, where the values ​​of the "composite" field are displayed.
Call:
Sample:

<xsl:template match="property[count(value/option) &gt; 0]" mode="table_options">
  <param name="{title}"><xsl:apply-templates select="value/option" mode="table_options" /></param>
</xsl:template>

<xsl:template match="option" mode="table_options">
    <xsl:value-of select="object/@name" />,
</xsl:template>

Thanks everyone

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question