Expand my Community achievements bar.

Introducing Adobe LLM Optimizer: Own your brandโ€™s presence in AI-Powered search and discovery

Reuse Common Dialog Parts in AEM Components

Avatar

Community Advisor

5/14/25

AEM Discussions

Reuse Common Dialog Parts in AEM Components

  by Mahedi Sabuj

Overview

One of the recurring challenges in AEM development? ๐——๐˜‚๐—ฝ๐—น๐—ถ๐—ฐ๐—ฎ๐˜๐—ถ๐—ป๐—ด ๐—ฑ๐—ถ๐—ฎ๐—น๐—ผ๐—ด ๐—ณ๐—ถ๐—ฒ๐—น๐—ฑ๐˜€ like text color, background color, or alt text across multiple components. Itโ€™s repetitive and error-prone.

๐—ง๐—ต๐—ฒ ๐˜€๐—บ๐—ฎ๐—ฟ๐˜๐—ฒ๐—ฟ ๐˜„๐—ฎ๐˜†: Create ๐—ฟ๐—ฒ๐˜‚๐˜€๐—ฎ๐—ฏ๐—น๐—ฒ ๐—ฑ๐—ถ๐—ฎ๐—น๐—ผ๐—ด ๐—ณ๐—ฟ๐—ฎ๐—ด๐—บ๐—ฒ๐—ป๐˜๐˜€ that can be included across different components.

In this article, I dive into:

  • How to reuse a common dialog ๐˜ข๐˜ด ๐˜ช๐˜ด using ๐š๐š›๐šŠ๐š—๐š’๐š๐šŽ/๐šž๐š’/๐šŒ๐š˜๐š–๐š™๐š˜๐š—๐šŽ๐š—๐š๐šœ/๐šŒ๐š˜๐š›๐šŠ๐š•/๐š๐š˜๐šž๐š—๐š๐šŠ๐š๐š’๐š˜๐š—/๐š’๐š—๐šŒ๐š•๐šž๐š๐šŽ
  • How to ๐—ฒ๐˜…๐˜๐—ฒ๐—ป๐—ฑ ๐—ผ๐—ฟ ๐—ผ๐˜ƒ๐—ฒ๐—ฟ๐—ฟ๐—ถ๐—ฑ๐—ฒ dialog properties using ๐šœ๐š•๐š’๐š—๐š:๐š›๐šŽ๐šœ๐š˜๐šž๐š›๐šŒ๐šŽ๐š‚๐šž๐š™๐šŽ๐š›๐šƒ๐šข๐š™๐šŽ โ€” adding flexibility without losing reusability.

For example, a ๐—ฐ๐—ผ๐—น๐—ผ๐—ฟ ๐—ฝ๐—ถ๐—ฐ๐—ธ๐—ฒ๐—ฟ ๐—ฑ๐—ถ๐—ฎ๐—น๐—ผ๐—ด ๐—ณ๐—ฟ๐—ฎ๐—ด๐—บ๐—ฒ๐—ป๐˜ can be reused in any component, ensuring consistency and making updates a breeze. Even better, by extending these dialogs, you can customize fields while keeping a clean, maintainable structure.

If you're developing in AEM and still copy-pasting dialog fields, itโ€™s time to rethink your strategy.

Read the full article here https://ms-29.com/aem/sites/reuse-common-dialog-parts-in-aem-components


Q&A

Please use this thread to ask questions relating to this article