I have footer with 3 parsys divs. If I add some component to that parsys(for example the Text component) I can't see it in another pages. Is it possible to have 1 common footer with 3 parsys components for all pages within a website?
I have this code in my 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>
Thanks for any help
What you're looking for is an iparsys
. From the Adobe docs:
The inherited paragraph system is a paragraph system that also allows you to inherit the created paragraphs from the parent. You add paragraphs to iparsys at for example,
/content/geometrixx/en/products
and as result, all the subpages of products that also haveiparsys
with the same name inherit the created paragraphs from the parent. On each level, you can add more paragraphs, which are then inherited by the children pages. You can also cancel paragraph inheritance at a level at any time.
You can use an iparsys in your page just like a regular paragraph system that you have above, simply by chaning the resourceType
to 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>
The content you drag in will then get inherited by the child pages. (They'll also need to use a template that references fc1
, fc2
and fc3
to pull in the content.)