Help with sightly | Community
Skip to main content
symsoft_abdul
Level 2
October 16, 2015
Solved

Help with sightly

  • October 16, 2015
  • 2 replies
  • 1964 views

Hi

I am new to AEM.  I am trying to create a basic page component using sightly.  I inherit the page from the AEM's sightly page component,  by specifying sling:resourceSuperType as wcm/foundation/components/page.

I have created my own head.html and body.html files in the component folder.

The page does show up in the touch-UI as well as in classic-UI.

However, my problem is that I do not get the side-kick in the classic UI.

Would someone please help me?

thanks

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

Did you include the clientlibs that load the sidekick?

Look in this file: /libs/wcm/foundation/components/page/head.html

Line 29 till 54 is taking care of the 'author-functionality'.

What I do for my project is to put the following code into an 'author.html', and include that into my head:

<meta data-sly-test="${!wcmmode.disabled}" data-sly-include="author.html" data-sly-unwrap></meta>

author.html :

<!--/* Outputs the WCM initialization code.If WCM mode is disabled nothing is rendered */--> <meta data-sly-use.wcmInit="/libs/wcm/foundation/components/page/initwcm.js" data-sly-use.clientLib="${'/libs/granite/sightly/templates/clientlib.html'}" data-sly-test="${!wcmmode.disabled && wcmInit.isTouchAuthoring}" data-sly-call="${clientLib.all @ categories='cq.authoring.page'}" data-sly-unwrap></meta> <meta data-sly-test="${!wcmmode.disabled && !wcmInit.isTouchAuthoring}" data-sly-call="${clientLib.all @ categories='cq.wcm.edit'}" data-sly-unwrap></meta> <script data-sly-test="${!wcmmode.disabled && !wcmInit.isTouchAuthoring}" type="text/javascript"> (function() { var cfg = ${wcmInit.undoConfig @ context='unsafe'}; cfg.pagePath = "${currentPage.path @ context='uri'}"; if (CQClientLibraryManager.channelCB() != "touch") { cfg.enabled = ${wcmmode.edit @ context="scriptString"}; CQ.undo.UndoManager.initialize(cfg); CQ.Ext.onReady(function() { CQ.undo.UndoManager.detectCachedPage((new Date()).getTime()); }); } })(); CQ.WCM.launchSidekick("${currentPage.path @ context='uri'}", { propsDialog: "${wcmInit.dialogPath @ context='uri'}", locked: ${currentPage.locked @ context="scriptString"}, previewReload: "true" }); </script>

2 replies

Feike_Visser1
Adobe Employee
Feike_Visser1Adobe EmployeeAccepted solution
Adobe Employee
October 16, 2015

Did you include the clientlibs that load the sidekick?

Look in this file: /libs/wcm/foundation/components/page/head.html

Line 29 till 54 is taking care of the 'author-functionality'.

What I do for my project is to put the following code into an 'author.html', and include that into my head:

<meta data-sly-test="${!wcmmode.disabled}" data-sly-include="author.html" data-sly-unwrap></meta>

author.html :

<!--/* Outputs the WCM initialization code.If WCM mode is disabled nothing is rendered */--> <meta data-sly-use.wcmInit="/libs/wcm/foundation/components/page/initwcm.js" data-sly-use.clientLib="${'/libs/granite/sightly/templates/clientlib.html'}" data-sly-test="${!wcmmode.disabled && wcmInit.isTouchAuthoring}" data-sly-call="${clientLib.all @ categories='cq.authoring.page'}" data-sly-unwrap></meta> <meta data-sly-test="${!wcmmode.disabled && !wcmInit.isTouchAuthoring}" data-sly-call="${clientLib.all @ categories='cq.wcm.edit'}" data-sly-unwrap></meta> <script data-sly-test="${!wcmmode.disabled && !wcmInit.isTouchAuthoring}" type="text/javascript"> (function() { var cfg = ${wcmInit.undoConfig @ context='unsafe'}; cfg.pagePath = "${currentPage.path @ context='uri'}"; if (CQClientLibraryManager.channelCB() != "touch") { cfg.enabled = ${wcmmode.edit @ context="scriptString"}; CQ.undo.UndoManager.initialize(cfg); CQ.Ext.onReady(function() { CQ.undo.UndoManager.detectCachedPage((new Date()).getTime()); }); } })(); CQ.WCM.launchSidekick("${currentPage.path @ context='uri'}", { propsDialog: "${wcmInit.dialogPath @ context='uri'}", locked: ${currentPage.locked @ context="scriptString"}, previewReload: "true" }); </script>
symsoft_abdul
Level 2
October 16, 2015

Thanks a lot Feike Visser

It worked like a charm...