0

我有 3 个 parsys div 的页脚。如果我向该 parsys 添加一些组件(例如 Text 组件),我将无法在其他页面中看到它。是否可以为网站内的所有页面使用 1 个公共页脚和 3 个 parsys 组件?

我有这个代码在我的myApp/components/page/footer.jsp

<%@include file="/libs/foundation/global.jsp" %>
<%@ page import="com.day.cq.commons.Doctype, com.day.cq.i18n.I18n, com.day.text.Text" %>
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<div id="footer">
<hr />
<div id="left-footer-cell" class="footer-cell">
<cq:include path="fc1" resourceType="foundation/components/parsys" />
</div>
<div id="mid-footer-cell" class="footer-cell">
<cq:include path="fc2" resourceType="foundation/components/parsys" />
</div>
<div id="right-footer-cell" class="footer-cell">
<cq:include path="fc3" resourceType="foundation/components/parsys" />
</div>
</div>

谢谢你的帮助

4

1 回答 1

4

您正在寻找的是一个iparsys. 来自Adob​​e 文档

继承的段落系统是一个段落系统,它还允许您从父级继承创建的段落。例如,您将段落添加到 iparsys,/content/geometrixx/en/products 结果,所有具有iparsys 相同名称的产品子页面都从父级继承创建的段落。在每个级别上,您可以添加更多段落,然后由子页面继承。您还可以随时取消某个级别的段落继承。

您可以在页面中使用iparsys,就像上面的常规段落系统一样,只需将resourceTypeto 更改为iparsys

<div id="left-footer-cell" class="footer-cell">
    <cq:include path="fc1" resourceType="foundation/components/iparsys" />
</div>
<div id="mid-footer-cell" class="footer-cell">
    <cq:include path="fc2" resourceType="foundation/components/iparsys" />
</div>
<div id="right-footer-cell" class="footer-cell">
    <cq:include path="fc3" resourceType="foundation/components/iparsys" />
</div>

然后,您拖入的内容将被子页面继承。(他们还需要使用引用的模板fc1fc2fc3提取内容。)

于 2013-08-12T08:22:30.377 回答