on ‎2018 Sep 25 10:03 AM
Hello Experts,
In the Products Search and Browse View of "Backoffice Product Content Management" (Product Cockpit) , products appear as grid by default. The configuration comes from the file hybris\bin\ext-backoffice\pcmbackoffice\resources\pcmbackoffice-backoffice-config.xml:
<context type="Product" component="pcmbackoffice-collection-browser" >
<cb:collection-browser xmlns:cb="http://www.hybris.com/cockpitng/config/collectionbrowser">
<cb:available-molds default-mold="grid-view">
<cb:mold spring-bean="listViewCollectionBrowserMoldStrategy"/>
<cb:mold spring-bean="gridViewCollectionBrowserMoldStrategy"/>
</cb:available-molds>
</cb:collection-browser>
</context>
I want to change the default for the mold from the grid-view in list-view. Of course, the right place is not in the above configuration file.
Does anyone knows how and where?
I've already tried in a custom extension in the xyz-backoffice-config.xml, but with no result.
Thank you.
Request clarification before answering.
It's working with:
<context type="Product" component="pcmbackoffice-collection-browser" module="pcmbackoffice">
<cb:collection-browser xmlns:cb="http://www.hybris.com/cockpitng/config/collectionbrowser">
<cb:available-molds default-mold="list-view">
<cb:mold spring-bean="listViewCollectionBrowserMoldStrategy"/>
<cb:mold spring-bean="gridViewCollectionBrowserMoldStrategy"/>
</cb:available-molds>
</cb:collection-browser>
</context>
Was missing "module="pcmbackoffice"".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi guys! I met similar issue with pcmbackoffice component pcmbackoffice-actions-explorer-tree-toolbar-primary I'm going to add action com.amway.lynx.actions.uploadMass.images and add module="pcmbackoffice" for the component pcmbackoffice-actions-explorer-tree-toolbar-primary, but when I click F4 in backoffice, it's present module="pcmbackoffice" module and my module="XXXpcmbackoffice" (extensssion name) <context component="pcmbackoffice-actions-explorer-tree-toolbar-primary" module="pcmbackoffice"> <y:actions xmlns:y="http://www.hybris.com/cockpit/config/hybris"> <y:group qualifier="common"> ........... </context><context component="pcmbackoffice-actions-explorer-tree-toolbar-primary" module="XXXpcmbackoffice"> <y:actions xmlns:y="http://www.hybris.com/cockpit/config/hybris"> <y:group qualifier="common"> <y:label>actiongroup.common</y:label> <y:action action-id="com.amway.lynx.actions.uploadMass.images"/> <y:action action-id="com.hybris.cockpitng.action.delete" property="selectionContext.selectedObject instanceof T(de.hybris.platform.core.model.ItemModel) ? selectionContext.selectedObject : null" triggerOnKeys="#del"/> </y:group> </y:actions> </context>
Hello Hazem,
I did it exactly as you describe. In the xyz-backoffice-config.xml I add this :
<context merge-by="type" type="Product" component="pcmbackoffice-collection-browser" >
<cb:collection-browser xmlns:cb="http://www.hybris.com/cockpitng/config/collectionbrowser">
<cb:available-molds default-mold="list-view">
<cb:mold spring-bean="listViewCollectionBrowserMoldStrategy"/>
<cb:mold spring-bean="gridViewCollectionBrowserMoldStrategy"/>
</cb:available-molds>
</cb:collection-browser>
</context>
(copy-paste from the pcmbackoffice extension and changed accordingly).
And of course "ant clean all". But still doesn't work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Mihai,
The xyz-backoffice-config.xml in a custom extension should work.
your custom extension extensioninfo.xml should have:
<requires-extension name="backoffice"/>
and
<meta key="backoffice-module" value="true"/>
and after making any changes to the backoffice config file, make sure to click on 'Reset Everything' from the back office orchestrator (accessible by clicking F4 in backoffice)
I hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.