Expand my Community achievements bar.

SOLVED

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

Avatar

Level 3

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.

1 Accepted Solution

Avatar

Correct answer by
Employee

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

View solution in original post

3 Replies

Avatar

Level 10

See this similar thread - Guillaume Carlino  posted an answer: 

http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manage...

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

Avatar

Correct answer by
Employee

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

Avatar

Level 3

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