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

SOLVED

AEM Sling Vanity, Add prefix path to the stored value

karthikb1706130
Level 1
Level 1

I have two sites for example

/content

------siteA

------siteB

whenever an author authors the sling vanity property for a particular page under site A, I want to append /siteA/ as a prefix to the value stored, similarly when an author authors vanity property under siteB, I need to append /siteB/ as a prefix to the value stored.
I came to know what we can achieve it using vanity-root tenant conf but could not find any documentation anywhere. 

Any suggestions on how to achieve this.

 

Thanks in Advance!!

1 Accepted Solution
Sanket_Kumbharkhane
Correct answer by
Level 4
Level 4

Hi @karthikb1706130,

You can refer to the steps needed to add and configure the Vanity Path Rewrite Mapper,

please visit https://adobe-consulting-services.github.io/acs-aem-commons/features/vanity-path-rewrite-mapper/inde...

 

Or

You can write a helper class using wcmuse or sling model and add it to your base template. So, whenever the author edits the vanity Url and saves the page, the request goes to the helper class. In helper class, you can read the value of vanity Url, append Sitename as prefix and write it back. 

Note: This is strictly for Author environment

View solution in original post

0 Replies
Sanket_Kumbharkhane
Correct answer by
Level 4
Level 4

Hi @karthikb1706130,

You can refer to the steps needed to add and configure the Vanity Path Rewrite Mapper,

please visit https://adobe-consulting-services.github.io/acs-aem-commons/features/vanity-path-rewrite-mapper/inde...

 

Or

You can write a helper class using wcmuse or sling model and add it to your base template. So, whenever the author edits the vanity Url and saves the page, the request goes to the helper class. In helper class, you can read the value of vanity Url, append Sitename as prefix and write it back. 

Note: This is strictly for Author environment

View solution in original post