template.html
<sly data-sly-use.logic="logic.js">
<h1>${logic.pageTitle}</h1>
</sly>
{ | |
"jcr:primaryType": "nt:unstructured", | |
"com.adobe.aem.wcm.site.manager.config.SiteConfig": { | |
"jcr:primaryType": "nt:unstructured", | |
"themePackageName": "SITENAME-theme" | |
}, | |
"com.adobe.cq.wcm.core.components.config.HtmlPageItemsConfig": { | |
"jcr:primaryType": "nt:unstructured", | |
"prefixPath": "/content/SITENAME.theme/_default", | |
"css": { |
// The following function generates an event handler that returns the eventInfo.path, and allows to filter events by properties. | |
function getEventPathHandler(callback, filter) { | |
return function (eventData) { | |
if (eventData.hasOwnProperty("eventInfo") && eventData.eventInfo.hasOwnProperty("path")) { | |
const eventObject = this.getState(eventData.eventInfo.path); | |
if (eventObject != null) { | |
for (const property in filter) { | |
if (!eventObject.hasOwnProperty(property) || (filter[property] !== null && filter[property] !== eventObject[property])) { | |
return; | |
} |
// In a browswer window with URL about:blank | |
// Open the JS console and paste this code | |
window.adobeDataLayer = []; | |
adobeDataLayer.push({ | |
event: "test-x", | |
x: 1 | |
}); | |
adobeDataLayer.push({ |
// In a browswer window with URL about:blank | |
// Open the JS console and paste this code | |
window.adobeDataLayer = []; | |
adobeDataLayer.push(function (dl) { | |
dl.addEventListener("test", function() { | |
console.log(dl.getState()); | |
}); | |
}); |
// In a browswer window with URL about:blank | |
// Open the JS console and paste this code | |
window.adobeDataLayer = []; | |
adobeDataLayer.push({ | |
event: "test", | |
x: 1 | |
}); | |
adobeDataLayer.push({ |
// In a browswer window with URL about:blank | |
// Open the JS console and paste this code | |
window.adobeDataLayer = []; | |
adobeDataLayer.push({ | |
x: 1 | |
}); | |
adobeDataLayer.push({ | |
event: "test", |
// In a browswer window with URL about:blank | |
// Open the JS console and paste this code | |
window.adobeDataLayer = []; | |
adobeDataLayer.push({ | |
x: 1 | |
}); | |
adobeDataLayer.push({ | |
event: "test", |
// In a browswer window with URL about:blank | |
// Open the JS console and paste this code | |
window.adobeDataLayer = []; | |
adobeDataLayer.push({ | |
x: 1 | |
}); | |
adobeDataLayer.push({ | |
event: "test", |
#!/bin/bash | |
mvn archetype:generate \ | |
-DarchetypeGroupId=com.adobe.granite.archetypes \ | |
-DarchetypeArtifactId=aem-project-archetype \ | |
-DarchetypeVersion=22 \ | |
-DgroupId=org.myorg \ | |
-DartifactId=mysite \ | |
-DartifactName="My Site" \ | |
-Dversion=0.0.1-SNAPSHOT \ | |
-Dpackage=org.myorg.mysite \ |