Skip to content

Instantly share code, notes, and snippets.

@rogerblanton
Created July 23, 2014 18:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rogerblanton/d0a83acbe864c277b39e to your computer and use it in GitHub Desktop.
Save rogerblanton/d0a83acbe864c277b39e to your computer and use it in GitHub Desktop.
When using sling to include CQ pages inside another CQ page, the init.jsp script will try to fire multiple times and the sidekick rendering will not work properly, instead check to see if the page you are reviewing is the actual page and use init.jsp to render sidekick, or if you are viewing it embedded in another page, disabled the init.jsp call
<%@include file="/myapp/includes/base-global.jsp" %>
<!-- Load sidekick only when viewing page on its own -->
<% if(currentPage.getPath().equals(resourcePage.getPath())) { %>
<cq:include script="/libs/wcm/core/components/init/init.jsp"/>
<% } %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment