Setting up a sightly based page template to use contexthub in AEM 6.2 | Community
Skip to main content
Level 3
February 15, 2017
Solved

Setting up a sightly based page template to use contexthub in AEM 6.2

  • February 15, 2017
  • 3 replies
  • 2315 views

We have a sample site which has basic template and a page level component. In its head.html we have included the context hub which is not reflecting on the page. The code snippet for head.html of our sample site as shown below:

<head>

<sly data-sly-resource="${ @ path = 'contexthub' , resourceType='libs/granite/contexthub/components/contexthub'}"></sly>

<title>${head.title}</title>

</head>

As per my understanding, To enable the ContextHub features we need to include contexthub component in the head section of our page level component. I am still unable to see the contexthub component on my page. Please correct if am missing any step in implementing the same.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Feike_Visser1

I think you are missing a / before libs in the resourceType

3 replies

smacdonald2008
Level 10
February 15, 2017

See this similar thread - Guillaume Carlino  posted an answer: 

http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.topic.html/forum__e9mf-how_to_use_theconte.html

You are correct - you would replace the use of include with HTL syntax. 

Feike_Visser1
Adobe Employee
Feike_Visser1Adobe EmployeeAccepted solution
Adobe Employee
February 15, 2017

I think you are missing a / before libs in the resourceType

Level 3
February 22, 2017

Thanks Feike Visser. It was corrected and it appears now.