[opencms-dev] CategoryWidget in openCms 8.5
Antoine PINEAU
a.pineau at eurelis.com
Mon Nov 19 10:43:48 CET 2012
Hello,
We implemented the new CategoryWidget which allows to directly select multiple categories in a xmlcontent.
The problem is that we cannot open the CategoryWidget filtered on the items of 1 category (using the configuration category="")
We have different types of categories (markets, applications, business units, ... that are located in /system/_categories) and different types of content (news, product, ... that are located in /shared/.content/contents) and we don't want all the categories to be applicable on all the contents.
For News, we only want markets and business units:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
...
<xsd:complexType name="OpenCmsNews">
<xsd:sequence>
...
<xsd:element name="Market" type="OpenCmsVfsFile" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="BusinessUnit" type="OpenCmsVfsFile" minOccurs="0" maxOccurs="unbounded" />
...
</xsd:sequence>
...
</xsd:complexType>
<xsd:annotation>
<xsd:appinfo>
<resourcebundle name="com.arkema.galaxy.opencms.core.newseventsworkplace"/>
...
<layouts>
...
<layout element="Market" widget="CategoryWidget" configuration="category=/markets/"/>
<layout element="BusinessUnit" widget="CategoryWidget" configuration="category=/businessunits/"
...
</layouts>
...
</xsd:appinfo>
</xsd:annotation>
</xsd:schema>
For News, we only want applications, markets and business units:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
...
<xsd:complexType name="OpenCmsRange">
<xsd:sequence>
...
<xsd:element name="Application" type="OpenCmsVfsFile" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="Market" type="OpenCmsVfsFile" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="BU" type="OpenCmsVfsFile" minOccurs="0" maxOccurs="unbounded" />
...
</xsd:sequence>
...
</xsd:complexType>
<xsd:annotation>
<xsd:appinfo>
...
<layouts>
<layout element="ShortDescription" widget="TextareaWidget" />
...
<layout element="Application" widget="CategoryWidget" configuration="category=/applications/" />
<layout element="Market" widget="CategoryWidget" configuration="category=/markets/" />
<layout element="BU" widget="CategoryWidget" configuration="category=/businessunits/" />
...
</layouts>
...
</xsd:appinfo>
</xsd:annotation>
</xsd:schema>
We also tried to use an absolute path for the categories (category="/system/_categories/applications/") without any success.
Can you give me tips on how to do that ?
Thanks in advance.
Best Regards
--
Antoine PINEAU
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20121119/9d9c740d/attachment.htm>
More information about the opencms-dev
mailing list