210 likes | 374 Views
AEM TEMPLATED DIALOGS. Enabling Contextual Variables for Authors. January 2019. About me. AEM Architect at Bounteous for 4 years Architected solutions around SSO, system integrations, marketing sites AEM Certified Developer, Business Practitioner, and Architect.
E N D
AEM TEMPLATED DIALOGS Enabling Contextual Variables for Authors January 2019
About me • AEM Architect at Bounteous for 4 years • Architected solutions around SSO, system integrations, marketing sites • AEM Certified Developer, Business Practitioner, and Architect https://www.linkedin.com/in/ryan-keenan-86090697/
Introduction to the problem • Imagine the following situation: • The author needs to add a message showing the current page’s title • They want to be able to modify the text around the title How?
Current “Solution” • Author does this: • Developer does this: • Just to get this… • When authors want to interact with the context of the content they are forced to rely on a developer
Aem templated dialogs solution • Author does this: • Gets this! • No developer no problem!
Always the best part Demo
What’s the nitty gritty? Tech talk
How it works • HTML Rewriter • Property aggregation • Java Reflection • Custom resource type for dialog • Datasource + JS • CoralUI 3 APIs
Available properties • Page Properties – both local and inherited • Custom POJO properties
What about those sweet custom properties? • Commoninterface • Implement the interface: com.bounteous.dialogs.core.model.BaseModel • Sling Model • Adapts from a Resource – page/jcr:content • Any getters you want (thanks Reflection)
Anything else? • HTML rewriting means the content is still cached – performant • Context/page based property aggregation means translation is • Supports recursion in the custom models (i.e. prefix.object.subobject.value) • Works regardless of whether you use the custom dialog field • Even works for links (rewrites the href) – great for lead gen
You like pie right? Just as easy. How to use it
Configure for your site • Add a rewriter configuration (or modify your own)
Is two clicks too many? • Enable the Property Aggregator OSGi service
Yes! …soon • Contribution to the ACS AEM Commons currently in review • Compatible with AEM 6.3 & 6.4
Wrapping Up • Key Points • Authors who want to be able to actually control their content need AEM Templated Dialogs • Extend the data to your heart’s desire with custom POJOs • Interested in More? • The full feature will soon be available in the standard ACS AEM Commons package: https://adobe-consulting-services.github.io/acs-aem-commons/ • Interested in more cool AEM stuff? Go to https://www.bounteous.com/contact/ and we can make time to talk!
Thank You. AEM Architect Ryan Keenan Phone: 719.502.5312 Email: ryan.keenan@bounteous.com LinkedIn: https://www.linkedin.com/in/ryan-keenan-86090697/