Hi,
According to our recent investigation Template editor does not work on pages created under /content/campaign.
AEM injects code into the markup that makes the page incompatible with the editable templates. By decompiling several java classes, I found that pages under /content/campaigns are processed by AEM differently than other content pages (path.startsWith("/content/campaigns") found in AEM's code).
Investigated on AEM 6.2. Is there a hot-fix / feature pack fixing this issue?
Thank you.
Best regards,
Gyorgy
I would request you to create a daycare ticket for this.
~kautuk
Views
Replies
Total Likes
We found a way to implement editable templates for emails with AEM's Template Editor to create emails under /content/campaign, but there were several lessons learnt.
Using our Template Editor enabled newsletter page component we can design editable templates for emails and create emails from them under /content/campaigns.
Hi Kornel,
We are planning to use Editable templates for Adobe Campaign pages, Can you please briefly explain the steps clearly , so we will follow to achieve this?
Thanks,
NAveen
Create a page component similar to below-
1. Create as structure for page component extending the core page component
2. Then override head.html and add below code on top of head.html code-
<sly data-sly-use.clientlib="/libs/granite/sightly/templates/clientlib.html" data-sly-call="${clientlib.all @ categories='cq.widgets'}"/>
<meta id="campaignContextHub" data-register="true" />
<sly data-sly-resource="${ @ path='config', resourceType='/libs/cq/personalization/components/clientcontext_optimized/config'}"/>
<sly data-sly-resource="${ @ path='contexthub', resourceType='/libs/granite/contexthub/components/contexthub'}"/>
This is to enable campagin features
3. Then follow steps in below link to create editable templates-
https://stackoverflow.com/questions/39290361/template-editor-aem-not-working-as-expected
Create the template
For now, we'll create the template in the global folder, later however you'll have to make sure that the chosen folder is specific to your site.
Add Client LibrariesLet's configure the page component to load the CSS and JS client libraries that are needed for our site.
we-retail.base
into it. Save by clicking the top-right checkmark.Add Structure ComponentsStructure components are those that were usually hard-coded through static includes on the page components. We typically don't want the structure components to be editable by our page authors later on, unless explicitly defined.
componentGroup
property). Make sure to have also the "Layout Container" component selected, as this is the paragraph system (aka parsys) that we'll require later to make the page editable. Save.Make the template editableWe now have to specify which of the components added we want page authors to be able to edit.
Use the templateThat's it, we can now enable the template and use it on a site.
cq:allowedTemplates
property on a parent page (typically, this property will be set to the root page of the site). However, to create the very first root page, we'll initially just add that property to the /content
node by using CRXDE Lite. So go to http://localhost:4502/crx/de/index.jsp#/content and on the root content
node set cq:allowedTemplates
multi-String property that equals to "/conf/global/settings/wcm/templates/.*"
(or whatever folder you created your template in).You should now see the page with the defined header and footer, but only the parsys in between that is editable. Also the desired components should show up in the left rail under the second "Components" tab.Create a Template TypeIn order to avoid having to repeat all these steps (mainly 1-18) each time one wants to create a new template, we can create a template type out of the template that we created.
/conf/global/settings/wcm/templates
and copy the template that should become a template type, like the simple-page
node in our case.template-types
folder (e.g. /conf/global/settings/wcm/template-types
in our case) and paste there the copied node.Now, when creating a template in the global folder, one can choose the "Simple Page" as a starting point.
As you can see, the Template Editor introduces a very big change, not only technically, but also in the process: what required development steps can now be achieved through configuration. I'd therefore recommend to edit the page component only to adapt the technical HTML headers, but not to hard-code any visual items that should be displayed on the page, because surely enough in a few months/years the visual items will change and multiple variations of them will be required, for which you want to lighten the development need to allow faster changes.
Also helpful are following links:
Hi @kautuk_sahni Do we have any solution to this?
Hi,
I think custom solution is only there as updated before.
Regards
Ankur
Views
Likes
Replies
Views
Likes
Replies