我們正在運行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。 –