ElasticPath (EP) is a robust technology for e-commerce solutions. EP partners with Adobe to provide integrated services for e-commerce solutions inside AEM. Out of the box (OOTB), users can import products from EP into AEM. This can be done manually or dynamically. To manually pull the products from EP to AEM, go to: http://localhost:4502/etc/importers/elasticpath.html.

This article will illustrate on how to update and/or create category(ies) and product(s) when the products get imported from EP.

Read more: How to Generate AEM/CQ Pages on Importing Products from ElasticPath (EP) into AEM

Let say you have 2 (or more) github accounts: ghaccusr1 and ghaccusr2. You want to use both of them on the same client (computer). What you need are:

  • Multiple SSH keys (id_rsa_*) and add the SSH key to the appropriate account on Github.
  • Add and configure your ~/.ssh/config.
  • Sync remote repo to your local project folder.

Read more: How to have multiple Github accounts on one computer

In AEM/CQ, when we include/add (sling:include, cq:include, or drag-and-drop) a component, in the front-end, there's an extra wrapper decorative DIV element. This DIV element allows CQ to bind events and content authoring functionality to so that content author can edit content in-place (right on the page).

In some case, we want disable CQ from binding content authoring capability to the DIV and in other case we want to completely remove that extra DIV element. Don't ask me why, it's just something that we need to get done LOL.

Disable CQ from binding content authoring capability to the DIV

if (...) {
    IncludeOptions.getOptions(request, true).forceSameContext(Boolean.TRUE);

Disable CQ from binding content authoring capability to component and completely remove that extra DIV element

if (...) {


I just noticed that on AEM 6, in my Filter, when I call RequestDispatcher forward, i.e. request.getRequestDispatcher(...).forward(req, res);, it cause i18n to break. Here's a snippet of my codes:

boolean filtered = false;

SlingHttpServletRequest request = req instanceof SlingHttpServletRequest ? (SlingHttpServletRequest) req : null;
SlingHttpServletResponse response = res instanceof SlingHttpServletResponse ? (SlingHttpServletResponse) res : null;
if (request != null && response != null) {
    // block of codes to resolve the request uri and get the new desired URI 
    if (this.resolvedUriResource != null) {
        String uri = this.resolvedUriResource.getPath() + ".html";
        RequestDispatcherOptions options = new RequestDispatcherOptions();
        this.filterConfig.getServletContext().getRequestDispatcher(uri).forward(req, res); // OR
        //request.getRequestDispatcher(this.resolvedUriResource, options).forward(req, res);
filtered = true;
} } if (!filtered) { chain.doFilter(req, res); } ...

The exact same codes was working on AEM6.0 and AEM 5.6.x.

Download this package to try out and see the issue: AEM6.1-i18n-issue-samplepackage.zip.

Any suggestion or comments are welcome!

This article is to demonstrate how a small piece of codes allow content authors, on author instance, to turn sidekick on/off. Don't ask me why. I had a case where this was desired. Here's the codes (it's a JSP/JS codes):

Note: don't forget to include: https://github.com/nimsothea/jquery-cookie/blob/master/src/jquery.cookie.js or have/use your own cookie functions.

<% final QueryStringParser queryStringParser = new QueryStringParser(request.getQueryString()); %> <% if (WCMMode.fromRequest(request) == WCMMode.EDIT) { if (queryStringParser.get("sidekickmode").equals("off")) { out.print("jQuery.cookie('sidekickmode','off',{expires:365,path:'/'});"); } else if (queryStringParser.get("sidekickmode").equals("on")) { out.print("jQuery.cookie('sidekickmode','on',{expires:365,path:'/'});"); } out.print("if(CQ && CQ.WCM && jQuery.cookie('readysidekickmode')==='off'){CQ.WCM.on('editablesready',function(){CQ.WCM.getSidekick().hide();jQuery('#cq-sk').remove();});}"); } %> </script>

Read more: Allow content authors to turn sidekkick on/off