on ‎2018 Feb 22 11:28 AM
Hi,
We have some components that make use of other components (nested components). The issue we are facing is that, when creating the nested component from Smart Edit, the attribute "Display Component" is set to false by default. Is there any way to change this behaviour?
We are using hybris 6.6.
Thanks.

Request clarification before answering.
Hi, for the nested components, the configuration to create the component is set in nestedComponentManagementService. so you can override the prepareComponentData data method in the service and append the content object with an additional property i.e., visible: true. This way any time you create a nested component, visibility is set to true by default.
The new method would look like:
var prepareComponentData = function(componentInfo, editorStackId) {
var type = componentInfo.componentType.toLowerCase();
return {
componentUuid: componentInfo.componentUuid,
componentType: componentInfo.componentType,
title: 'type.' + type + '.name',
content: lodash.defaultsDeep({}, {
typeCode: componentInfo.componentType,
itemtype: componentInfo.componentType,
visible: true
}, componentInfo.content),
editorStackId: editorStackId
};
};
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.
Is there a step by step guide to follow for this ?
Thanks for your help in advance !!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is there a step by step guide to follow for this ?
Thanks for your help in advance !!
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 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.