on 2018 Jun 08 1:54 PM
Hi everyone
we're able to add new tabs and fields to Backoffice by copying over the existing XML, but would it be possible to avoid this, in order to avoid XML duplication? ie. customizing the Product's editorArea would mean copying over thousands of XML lines.
ref. https://help.hybris.com/6.7.0/hcd/8bd51bcd8669101486cec32d579bb2c2.html
Some example code below:
Adding a new tab - all the existing tabs are gone
<context merge-by="type" parent="GenericItem" type="ServiceContract" component="editor-area" module="platformbackoffice">
<editorArea:editorArea name="">
<editorArea:tab name="tab.client" position="1">
<editorArea:section name="section.client.editor.additional">
<editorArea:attribute qualifier="testimonial"/>
<editorArea:attribute qualifier="includedOptionals"/>
<editorArea:attribute qualifier="availableColors"/>
</editorArea:section>
</editorArea:tab>
</editorArea:editorArea>
</context>
Adding a new field - existing fields are copied over from original XML
<context merge-by="type" type="ServiceContract" component="create-wizard" module="platformbackoffice">
<wz:flow id="orderWizard" title="create.title(ctx.TYPE_CODE)">
<wz:prepare id="orderPrepare">
<wz:initialize property="order" type="ctx.TYPE_CODE"/>
</wz:prepare>
<wz:step id="step1" label="create.discountrow.essential.label">
<wz:content id="step1.content">
<wz:property-list root="order">
<!-- begin new field -->
<wz:property qualifier="contractId"/>
<!-- end new field -->
<wz:property qualifier="code"/>
<wz:property qualifier="user"/>
<wz:property qualifier="date"/>
<wz:property qualifier="currency"/>
</wz:property-list>
</wz:content>
<wz:navigation id="step1.navigation">
<wz:cancel/>
<wz:done>
<wz:save property="order"/>
</wz:done>
</wz:navigation>
</wz:step>
</wz:flow>
</context>
thanks nicola
Request clarification before answering.
Got it working like below. Please note the parent attribute
<context merge-by="type" parent="Order" type="ServiceContract" component="editor-area" module="yourcustombackofficemodule">
<editorArea:editorArea name="">
<editorArea:tab name="tab.custom1" position="1">
[...]
</editorArea:tab>
</editorArea:editorArea>
</context>

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.