I usually use <cq:include path="fakepath" resourceType="/project/components/testcomponent" />
to include a component inside a another component, named it as "setComponent".
Assume, "setComponent" drag and dropped onto a page and no data entered yet.
Question 1:
First thing is the "testcomponent" resource does not exist at the /content tree page level and I see GET request to "fakepath.infinity.json" when I double click "testcomponent" to enter data, and this GET request is failing (404 error in browser developer tool console). Not sure, whether it is expected behavior.
Question 2:
How can I include component "/apps/project/components/testcomponent" inside a parent component using below tags ?
<sling:include path="" />
<sling:include resource="" />
<sling:include path="" resourceType="" />
I am educating myself to properly understand and trying to see if sling:include could get rid of 404 error that I am talking.
Thank you, Sri
<%@include file="/libs/foundation/global.jsp"%>
<div>
<cq:include path="navMenu"
resourceType="sampleproj/components/common/testMenu" />
</div>
pseudocode for testMenu jsp:
<%@page session="false"%>
<%@include file="/libs/foundation/global.jsp"%>
<%@ page import="com.day.cq.commons.Doctype,
com.day.cq.wcm.api.PageFilter,
com.day.cq.wcm.foundation.Navigation" %>
<ul class="nav">
<li><a href='navitempath.html'><div>navitemtitle</div></a></li>
</ul>