gpt4 book ai didi

aem - 在CQ的cq :IncludeClientLib,中,theme和categories属性有什么区别?

转载 作者:行者123 更新时间:2023-12-04 14:06:58 24 4
gpt4 key购买 nike

根据docs :

类别

A list of comma-separated client lib categories. This will include all Javascript and CSS libraries for the given categories. The theme name is extracted from the request. Equivalent to: com.day.cq.widget.HtmlLibraryManager#writeIncludes

主题

A list of comma-separated client lib categories. This will include all theme related libraries (both CSS and JS) for the given categories. The theme name is extracted from the request. Equivalent to: com.day.cq.widget.HtmlLibraryManager#writeThemeInclude

我是 CQ 的新手,这对我来说有点模糊。这些属性有什么区别?

最佳答案

假设您在 JCR 中有以下内容: -/etc/clientlibs/网格 -/etc/clientlibs/表格 -/etc/clientlibs/表 -/etc/clientlibs/表/响应 -/etc/clientlibs/tables/inverse

类别 应包含不相关的客户端库列表。例如<cq:includeClientLib categories="grid, forms, tables" />

主题 应该引入不同的相关客户端库。或者可能更好地描述为子类别。例如,<cq:includeClientLib categories="tables" themes="inverse, responsive" />

不同之处在于主题位于类别内。 tables可以只包含“子类别”(或主题),但您有充分的理由将它们分开。你想用你的一般 tables您所有页面和设计上的类别,但某些页面需要 inverse表的显示。或者只有某些页面包含 responsive表格。

我认为 CQ5.5 在代码中有更好的示例,但 CQ5.6 似乎不再有太多 OOB。

关于aem - 在CQ的cq :IncludeClientLib,中,theme和categories属性有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21842203/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com