Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

AEM: Creating custom Granite render conditions | AEM Community Seeding

Avatar

Administrator

BlogImage.jpg

AEM: Creating custom Granite render conditions by Theo Pendle

Abstract

How to create a custom, complex render condition using HTL and Java Sling Models instead of JSPs for AEM TouchUI

What is a Granite render condition?
“Render condition” is a fairly self-explanatory term. More specifically, according to Granite documentation, it is “a mechanic to indicate if the component should be rendered or not”.
So how does it work? You can find an example that you’ll probably recognize if you’ve ever used Assets (although there are hundreds of others): you cannot perform the same actions on an original asset as on a live copy.

The use case
Note: This use case was inspired by this question on the AEM Experience League forums. Thanks user neos45149736 for an interesting challenge 👍

Here is what we want to do: create a component edit dialog which will render a certain field only if the component is on a page with a certain Navigation Title.

Note: for this tutorial I am using Editable templates.
I won’t go over how to create a template, I’ll assume you already have one.

Read Full Blog

AEM: Creating custom Granite render conditions

Q&A

Please use this thread to ask the related questions.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

0 Replies