Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

selector (resource resolution) not working

Avatar

Level 9

I have a page that uses this page template (sling:resourceType = /apps/flinders/components/page/content-page)

 

to test selectors (which I have not done before), I created a copy of /apps/flinders/components/page/content-page/content-page.html and called it /apps/flinders/components/page/content-page/content-page.test.html. The contents of the 2 files are the same EXCEPT I added a "hello there" text on the test.html version.

 

When viewing the page via view-as-published with the selector (example: http://localhost:4502/content/mysite/en/animals/frogs.test.html?wcmmode=disabled), I do not see the "hello there" text. What am I missing? Thank you.

 

<!DOCTYPE HTML>
<html data-sly-use.page="com.adobe.cq.wcm.core.components.models.Page" lang="${page.language}"
      data-sly-use.head="head.html"
      data-sly-use.footer="footer.html"
      data-sly-use.redirect="redirect.html">
    <head data-sly-call="${head.head @ page = page}"></head>
    <body>
        <h1>hello there</h1>
        <sly data-sly-test.isRedirectPage="${page.redirectTarget && (wcmmode.edit || wcmmode.preview)}"
             data-sly-call="${redirect.redirect @ redirectTarget = page.redirectTarget}"></sly>
        <!-- always include the rest of the page -->
            <sly data-sly-include="body.socialmedia_begin.html"></sly>
            <sly data-sly-include="body.html"></sly>
            <!--<sly data-sly-call="${footer.footer @ page = page}"></sly>-->
            <sly data-sly-include="body.socialmedia_end.html"></sly>
    </body>
</html>

 

 

0 Replies