Skip to content

Support multiple categories in ProductListerWidget#52

Merged
NiclasCedermalm merged 2 commits into
RWS:developfrom
erikssonorjan:develop
Jan 15, 2019
Merged

Support multiple categories in ProductListerWidget#52
NiclasCedermalm merged 2 commits into
RWS:developfrom
erikssonorjan:develop

Conversation

@erikssonorjan
Copy link
Copy Markdown
Contributor

Added list of categories and removed single category.

@erikssonorjan
Copy link
Copy Markdown
Contributor Author

erikssonorjan commented Jan 15, 2019

The schema also need to be updated. Categories (multiple) should be added and single category should be removed:

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="uuid:3e7cc2b0-7f41-4333-b946-faa82a29d979" xmlns:tcmi="http://www.tridion.com/ContentManager/5.0/Instance" elementFormDefault="qualified" targetNamespace="uuid:3e7cc2b0-7f41-4333-b946-faa82a29d979">
  <xsd:import namespace="http://www.tridion.com/ContentManager/5.0/Instance" schemaLocation="cm_xml_inst.xsd"></xsd:import>
  ...
  <xsd:annotation>
    <xsd:appinfo>
      <tcm:Labels xmlns:tcm="http://www.tridion.com/ContentManager/5.0">
        <tcm:Label ElementName="categories" Metadata="true">Categories</tcm:Label>
		...
      </tcm:Labels>
    </xsd:appinfo>
  </xsd:annotation>
  <xsd:element name="ProductListerWidget">
    <xsd:complexType>
      <xsd:sequence></xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="Metadata">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="categories" minOccurs="0" maxOccurs="unbounded" type="ECommerceCategory">
          <xsd:annotation>
            <xsd:appinfo>
              <ExtensionXml xmlns="http://www.tridion.com/ContentManager/5.0"></ExtensionXml>
              <tcm:EmbeddedSchema xmlns:tcm="http://www.tridion.com/ContentManager/5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="tcm:21-832-8" xlink:title="E-Commerce Category"></tcm:EmbeddedSchema>
            </xsd:appinfo>
          </xsd:annotation>
        </xsd:element>	
		...
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>

@NiclasCedermalm NiclasCedermalm merged commit 901810f into RWS:develop Jan 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants