Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

<cq:include> for an AEM 6.3 HTML file?

Avatar

Level 4

Hi All,

Does anyone know how I can do a "<cq:include>" on am AEM 6.3 HTML file?

I am trying to import an old AEM 6.2 JSP Component into an AEM 6.3 project.

The old AEM 6.2 JSP Component contains the following line :-

     <cq:include path="mobile-navigation" resourceType="components/content/navigation/mobilenav"/>

When I include this in the AEM 6.3 HTML file , it is including in literally when I view the output page source in the Browser

I have tried adding the following to the top of the AEM 6.3 HTML file but this does not solve the problem :-

     <%@taglib prefix="cq" uri="http://www.day.com/taglibs/cq/1.0" %>

Thanks for your advise.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi Robert

    You can include a resource  as

<div data-sly-resource="${@ path='header_par', resourceType='foundation/components/parsys'}" data-sly-unwrap></div>

This may help HTL Block Statements

Here is a solved questionDynamic path and resourcetype in data-sly-resource

Thanks

Veena

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi Robert

    You can include a resource  as

<div data-sly-resource="${@ path='header_par', resourceType='foundation/components/parsys'}" data-sly-unwrap></div>

This may help HTL Block Statements

Here is a solved questionDynamic path and resourcetype in data-sly-resource

Thanks

Veena