Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/redis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/cmake/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在AEM中的自定义组件上使用子编辑器?_Aem_Aem Core Wcm Components - Fatal编程技术网

如何在AEM中的自定义组件上使用子编辑器?

如何在AEM中的自定义组件上使用子编辑器?,aem,aem-core-wcm-components,Aem,Aem Core Wcm Components,就像core中的Accordion和Carousel组件一样,您可以打开组件对话框并通过单击多字段上的“添加”按钮添加自定义嵌套组件。我正在尝试将此功能添加到自定义组件的对话框中 在我的对话框的.content.xml中,我在多字段编辑器或子编辑器中找到了这个代码片段 <slides jcr:primaryType="nt:unstructured" sling:resourceType="core/wcm/components/commons/editor/dialog/chil

就像core中的Accordion和Carousel组件一样,您可以打开组件对话框并通过单击多字段上的“添加”按钮添加自定义嵌套组件。我正在尝试将此功能添加到自定义组件的对话框中

在我的对话框的.content.xml中,我在多字段编辑器或子编辑器中找到了这个代码片段

<slides
  jcr:primaryType="nt:unstructured"
  sling:resourceType="core/wcm/components/commons/editor/dialog/childreneditor/v1/childreneditor"/>
问题是,当我点击新组件对话框的add按钮时,什么都没有弹出


我这里缺少什么?

我认为您缺少将
sling:resourceSuperType=core/wcm/components/carousel/v1/carousel
添加到您的自定义组件

如果不想覆盖,请在组件HTL文件中添加以下代码:

 <sly data-sly-resource="${resource.path @ resourceType='wcm/foundation/components/parsys/newpar', appendPath='/*', decorationTagName='div', cssClassName='new section aem-Grid-newComponent'}"
     data-sly-test="${(wcmmode.edit || wcmmode.preview)}"></sly>


这是因为您在newpar中插入了一个子组件。

我认为您缺少向自定义组件添加
sling:resourceSuperType=core/wcm/components/carousel/v1/carousel

如果不想覆盖,请在组件HTL文件中添加以下代码:

 <sly data-sly-resource="${resource.path @ resourceType='wcm/foundation/components/parsys/newpar', appendPath='/*', decorationTagName='div', cssClassName='new section aem-Grid-newComponent'}"
     data-sly-test="${(wcmmode.edit || wcmmode.preview)}"></sly>


这是因为您在新PAR中插入了子组件。

但这不是旋转木马。为什么我需要放置“sling:resourceSuperType=core/wcm/components/carousel/v1/carousel?”“由于此功能是从/apps/core/wcm/components/tabs/v1/tabs或/apps/core/wcm/components/carousel/v1/carousel继承而来的,因此如果不需要,可以在此处使用所有clientlib/apps/core/wcm/components/commons/editor。如果能解决你的问题,请告诉我issue@Rongeegee,因为它解决了您的问题,如果您遵循SO的指导原则,接受以下答案,我将不胜感激:抱歉迟到。谢谢你,我还有一个类似的问题。我将来自carousel的editConfig添加到我的新组件中,但仍然没有解决新问题。你知道我该做什么吗?但这不是旋转木马。为什么我需要放置“sling:resourceSuperType=core/wcm/components/carousel/v1/carousel”,因为此功能继承自/apps/core/wcm/components/tabs/v1/tabs或/apps/core/wcm/components/carousel/v1/carousel,如果您不想,那么您可以在这里使用所有clientlib/apps/core/wcm/components/commons/editor。如果能解决你的问题,请告诉我issue@Rongeegee,因为它解决了您的问题,如果您遵循SO的指导原则,接受以下答案,我将不胜感激:抱歉迟到。谢谢你,我还有一个类似的问题。我将来自carousel的editConfig添加到我的新组件中,但仍然没有解决新问题。你知道我该做什么吗?