在AEM中启用标尺和布局模式需要做几件事情。
标尺(模拟器)
- 确保
/libs/wcm/mobile/components/simulator/simulator.jsp
是在你的页面
的当头一MobileEmulatorProvider
注册页面组件。例如:
com.day.cq.wcm.mobile.core.impl.MobileEmulatorProvider-alias.xml:
mobile.resourceTypes=[geometrixx-media/components/page]
的cq:deviceGroup
属性添加到根内容节点(即在/ etc /移动/组/响应)
注:统治者将不会出现,除非页面被视为“响应”。在“仿真器”属性不能为空在http://localhost:4502/libs/wcm/core/content/pageinfo.json?path=<path to page>
布点模式
的cq:responsive
节点添加到根内容节点(刚从geometrixx媒体抓住它)。例如:
<cq:responsive jcr:primaryType="nt:unstructured">
<breakpoints jcr:primaryType="nt:unstructured">
<phone jcr:primaryType="nt:unstructured" title="{String}Phone" width="{Decimal}768"/>
<tablet jcr:primaryType="nt:unstructured" title="{String}Tablet" width="{Decimal}1200"/>
</breakpoints>
</cq:responsive>
如果不从基础页面组件继承,添加/libs/foundation/components/page/cq:infoProviders/responsive
节点页面组件
- 变化“相提并论” parsys为类型
wcm/foundation/components/responsivegrid
- 包括响应CSS客户端的lib在该项目(见下文)
更多信息:https://docs.adobe.com/docs/en/aem/6-2/author/page-authoring/responsive-layout.html
我STI我不明白是什么让模拟器隐藏起来,但是当我关注@mickleroy的帖子。有效! 谢谢你的回答! –