Expand my Community achievements bar.

SOLVED

sidekick not showing up because not included head.jsp?

Avatar

Level 3

Hi,

  I am a newbie to CQ5 and I am trying to follow this tutorial to create a simple page with a sidekick. http://dev.day.com/docs/en/cq/current/howto/website.html

  This is my contentpage.jsp

 <%@include file="/libs/foundation/global.jsp"%><%
%><%@page session="false" contentType="text/html; charset=utf-8" %><%
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<cq:include script="head.jsp"/>
<cq:include script="body.jsp"/>
</html>

And I found something weird. If i remove cq:include head.jsp, the sidekick will not show on the page. I wondered why? If this is a mandetory on the page, what else are mandetory?

 

Thank you

1 Accepted Solution

Avatar

Correct answer by
Level 8

Well head.jsp is not itself mandatory, however it does do some mandatory things which whether you rely on the inherited head.jsp, or you create your own head.jsp need to happen. You can see what it does by looking at /libs/foundation/components/page/head.jsp in CRXDE Lite.

  • The reason sidekick isn't showing up is that head.jsp includes /libs/wcm/core/components/init/init.jsp. init.jsp includes authoring related CSS and JavaScript and launches the sidekick. 
  • head.jsp also prints out the html head element of your page - without a head element your page isn't a valid HTML page. 
  • It also includes headlibs.jsp which is responsible for including your page's CSS and JS. 

In most real world scenarios you override both head.jsp and headlibs.jsp in order to match your project's requirements. 

View solution in original post

1 Reply

Avatar

Correct answer by
Level 8

Well head.jsp is not itself mandatory, however it does do some mandatory things which whether you rely on the inherited head.jsp, or you create your own head.jsp need to happen. You can see what it does by looking at /libs/foundation/components/page/head.jsp in CRXDE Lite.

  • The reason sidekick isn't showing up is that head.jsp includes /libs/wcm/core/components/init/init.jsp. init.jsp includes authoring related CSS and JavaScript and launches the sidekick. 
  • head.jsp also prints out the html head element of your page - without a head element your page isn't a valid HTML page. 
  • It also includes headlibs.jsp which is responsible for including your page's CSS and JS. 

In most real world scenarios you override both head.jsp and headlibs.jsp in order to match your project's requirements.