I have a content type AB, it extends two content types A and B. Each of this content type have a tab in its main view named My tab.
On view mode (if the fields are not empty) and on edition, I obtain two tabs "My tab".
Content type AB :
<cms:content-type xmlns:cms="http://www.ametys.org/schema/cms" extends="A, B" abstract="false"> <cms:label>Content type AB</cms:label> <cms:description>Content type AB</cms:description> <cms:default-title>New content AB</cms:default-title> </cms:content-type>
Content type A :
<cms:content-type xmlns:cms="http://www.ametys.org/schema/cms" abstract="false"> <cms:label>Content type A</cms:label> <cms:description>Content type A</cms:description> <cms:default-title>New content A</cms:default-title> <cms:metadata name="title" type="string"> <cms:label>Title</cms:label> <cms:description>Title</cms:description> </cms:metadata> <cms:metadata name="fieldA" type="string"> <cms:label>Field A</cms:label> <cms:description>Field A</cms:description> </cms:metadata> <cms:metadata-set name="main" type="view"> <cms:metadata-ref name="title"/> <cms:fieldset role="tab"> <cms:label>My tab</cms:label> <cms:metadata-ref name="fieldA"/> </cms:fieldset> </cms:metadata-set> <cms:metadata-set name="main" type="edition"> <cms:metadata-ref name="title"/> <cms:fieldset role="tab"> <cms:label>My tab</cms:label> <cms:metadata-ref name="fieldA"/> </cms:fieldset> </cms:metadata-set> </cms:content-type>
Content type B :
<cms:content-type xmlns:cms="http://www.ametys.org/schema/cms" abstract="false"> <cms:label>Content type B</cms:label> <cms:description>Content type B</cms:description> <cms:default-title>New content B</cms:default-title> <cms:metadata name="title" type="string"> <cms:label>Title</cms:label> <cms:description>Title</cms:description> </cms:metadata> <cms:metadata name="fieldB" type="string"> <cms:label>Field B</cms:label> <cms:description>Field B</cms:description> </cms:metadata> <cms:metadata-set name="main" type="view"> <cms:metadata-ref name="title"/> <cms:fieldset role="tab"> <cms:label>My tab</cms:label> <cms:metadata-ref name="fieldB"/> </cms:fieldset> </cms:metadata-set> <cms:metadata-set name="main" type="edition"> <cms:metadata-ref name="title"/> <cms:fieldset role="tab"> <cms:label>My tab</cms:label> <cms:metadata-ref name="fieldB"/> </cms:fieldset> </cms:metadata-set> </cms:content-type>
- Est référencé par
-
CMS-10303 [Regression] Multityped content : Tabs appears twice and empty in edition mode
- Closed