AEM - 无法在组件
问题描述:
中看到编辑选项
以下是我在HTL文件footer.html中编写的代码我在此处使用可编辑模板。AEM - 无法在组件
<div class="6u">
<div class="row collapse-at-2">
<sly data-sly-test="${footer.arr}">
<sly data-sly-repeat="${footer.arr}">
<sly data-sly-resource="${'column${itemList.index}' @resourceType='aem-site/components/structure/footer/footerList'}"></sly>
</sly>
</sly>
</div>
</div>
和footerList.html文件中有这样一段代码(它是硬编码的,但现在它不是最终的代码)
我一直面临着编辑组件一些奇怪的问题。这是组件的样子在页面上:
我期待footerList组件显示为包含每一个列两个单独的部件自$ {} footer.arr在footer.html值是2.但它看起来像它是一个包含两列的组件。
我面临的另一个问题是,我没有得到一个选项来编辑组件如下图所示的图像:
这是组件如何看待在CRXDE
请让我知道是否需要任何进一步的信息。
答
您的footerList
组件需要通过容器组件包含才能编辑。您可以将它们直接包含在顶层容器(在这种情况下为响应网格),或者将组件作为容器(通过扩展响应式网格 - 请参阅Core Components Form Container)
那么,这是否意味着我必须包含容器在代码中代替footerList组件,然后将footerList组件拖放到容器上? – user972418
这取决于您的需求。你可以有一个完全可编辑的容器,或者在容器中有一些预定义的内容。 – Vlad
我想在这里实现的是包含一个组件,footerList,根据在页脚组件对话框中选择的内容的次数(1-5)。你如何建议是一个更好的实现方式? – user972418