Jyoshna mr
Jyoshna mr

Reputation: 45

how to add custom section in hybris product cockpit editor area

I have tried below configuration,but it's not working.please let me know what all the other things need to be done to make it work.

<editor>
<custom-group class="de.hybris.platform.cockpit.services.config.impl.ClassAttrEditorSectionConfiguration" qualifier="New Section" initially-opened="false" visible="true">
<label>New Section<label/>
</custom-group>
</editor>

Upvotes: 1

Views: 5985

Answers (2)

Mafick
Mafick

Reputation: 1168

The above explanation is very well written, but is this really what you want? You wrote something about "how to add custom SECTION".

So if you are talking about this stuff here: enter image description here

If you want add stuff like this, you have to do things for example like here in the editorArea_xxx.xml file:

	<group qualifier="admin" visible="true" initially-opened="false">
		<label key="config.general.administration" />
		<property qualifier="CMSItem.uid"/>
		<property qualifier="AbstractCMSComponent.slots"/>
		<property qualifier="AbstractCMSComponent.container"/>
		<property qualifier="Item.pk" />
		<property qualifier="Item.creationTime" />
		<property qualifier="Item.modifiedtime" />
	</group>

Than do the step 2) and 3) from Mouad EL Fakir answear.

BR

Upvotes: 1

Mouad EL Fakir
Mouad EL Fakir

Reputation: 3749

To add a new custom group to the cockpit you need to follow some specific instructions.

  1. First, in [custom]cockpits\resources\[custom]cockpits-config\[custom_group]\editorArea_[custom_item].xml add the following snippet :

[custom_group] : could be admingroup or cockpitgroup for example.
[custom_item] : could be Product or MyProduct or any other item.

For example : mycockpits\resources\mycockpits-config\admingroup\editorArea_Product.xml

<custom-group class="de.hybris.platform.cockpit.services.config.impl.ClassAttrEditorSectionConfiguration" qualifier="my_new_section" initially-opened="true" show-if-empty="true"  visible="true">

   <label lang="de">Section name [DE]</label>
   <label lang="en">Section name [EN]</label>
   <label lang="fr">Section name  [FR]</label>

</custom-group>

class : should be implementing CustomEditorSectionConfiguration and extending from DefaultEditorSectionConfiguration.
qualifier : should not contains blank space.

  1. Run Ant, then execute the update from HAC with project data for the extension mycockpits is checked :

    enter image description here

Note : that the update it could be not necessary in some cases.

  1. Finally, from/productcockpit reset the personalized settings :

    enter image description here

Then you should be able to see the new Section now.

Upvotes: 1

Related Questions