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
BedrockMission!

Learn More

View all

Sign in to view all badges

AEM: Creating custom Granite render conditions | AEM Community Seeding

Avatar

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,135 likes

Total Posts

6,158 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,135 likes

Total Posts

6,158 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile
kautuk_sahni
Community Manager

27-04-2020

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.

AEM AEMEBlogSeeding Experience Manager