我们正在运行Adobe CQ V5.5.0.20120220 Service Pack 2,并且我的任务是创建一些新模板并限制这些模板可用的组件,而不必在设计模式下手动配置它们。我遵循Restrict the components in AEM 5.6.1的顶级投票答案的建议。我们在设计节点下已经有了这个.content.xml文件,所以我只是复制了一个工作正常并修改过的文件中的现有部分,以匹配我的新模板。组件已设计但未显示在Sidekick中
我遇到的问题是,当我用新模板创建一个新页面时,sidekick是空的。我可以在CRXDE中看到我的配置在服务器上运行。当我进入设计模式时,我还可以看到已配置的组件已被选中。但是这个伙伴仍然是空的。如果我取消选中一个组件并重新检查它,那么这些东西就会开始出现在伙伴中。我已经完成了这个工作,并通过包管理器导出了设计节点,并且生成的文件完全匹配(除了空格)我从源代码控制部署的内容。我在这里错过了一些问题吗?我们以这种方式配置的其他模板显示了sidekick中的指定组件,所以我猜测其差异在于我的模板或由我的模板指定的resourceType,但我似乎无法弄清楚。提前致谢。
编辑 - 添加.content.xml片段。整个文件有点长。如果有帮助,我可以链接到完整文件。
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
jcr:primaryType="cq:Page">
<clientlibs/>
<jcr:content
cq:doctype="html_5"
cq:lastModified="{Date}2013-05-08T14:25:15.588-04:00"
cq:lastModifiedBy="admin"
jcr:primaryType="nt:unstructured"
jcr:title="My Site"
sling:resourceType="wcm/core/components/designer">
<department-resources-main jcr:primaryType="nt:unstructured">
<par
jcr:primaryType="nt:unstructured"
sling:resourceType="foundation/components/parsys"
components="[/apps/aau-42/components/components/lms-user-media]">
</par>
</department-resources-main>
</jcr:content>
<images/>
</jcr:root>
模板数据,位于/应用/ AAU-42 /模板/部门资源,主要:
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
jcr:description="Template for AAU Main Department Resources Pages"
jcr:primaryType="cq:Template"
allowedParents="[/apps/aau-42/templates/department]"
jcr:title="AAU Main Department Resources Page">
<jcr:content
cq:allowedTemplates="[/apps/aau-42/templates/department_resources_detail]"
jcr:primaryType="cq:PageContent"
sling:resourceType="aau-42/components/pages/department-resources-main" />
</jcr:root>
网页组件的数据,位于/应用/ AAU-42 /组件/页/ department-resources-main:
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:description="Main Department Resources Page"
jcr:primaryType="cq:Component"
jcr:title="Main Department Resources Page"
sling:resourceSuperType="aau-42/components/pages/base"/>
你可以发布.content.xml以供参考吗? – rakhi4110
您可以仔细检查页面加载时是否存在JS错误(例如,通过控制台)并尝试新浏览器中的页面(以确保JS驱动Sidekick不是缓存) – anotherdave
哦,兄弟......我在Chrome浏览器窗口中启动了该页面,然后瞧,这工作。这非常令人沮丧。感谢您的建议@anotherdave。 –