Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

sidekick not showing up because not included head.jsp?

Avatar

Avatar
Validate 10
Level 2
Rui_J
Level 2

Likes

4 likes

Total Posts

39 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 10
Level 2
Rui_J
Level 2

Likes

4 likes

Total Posts

39 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 3
Boost 1
Affirm 1
View profile
Rui_J
Level 2

15-10-2015

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

View Entire Topic

Avatar

Avatar
Boost 5
MVP
Paul_McMahon
MVP

Likes

45 likes

Total Posts

235 posts

Correct Reply

142 solutions
Top badges earned
Boost 5
Boost 3
Boost 25
Boost 10
Boost 1
View profile

Avatar
Boost 5
MVP
Paul_McMahon
MVP

Likes

45 likes

Total Posts

235 posts

Correct Reply

142 solutions
Top badges earned
Boost 5
Boost 3
Boost 25
Boost 10
Boost 1
View profile
Paul_McMahon
MVP

15-10-2015

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.