AuthorLink: How to generate a link to directly edit the page? | Community
Skip to main content
Level 6
January 6, 2023
Solved

AuthorLink: How to generate a link to directly edit the page?

  • January 6, 2023
  • 1 reply
  • 662 views

Hi

Is there a way one can generate a link to directly edit a page in AEM? I need to include this link in an email that I send out from a component.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Siva_Sogalapalli

You can construct the AEM url in the sling model and use the same while sending email.

1. First get the current page path using Page object.

@586265

private Page currentPage; 

2. Use Externalizer to get the hostname and the construct complete url ("<hostname>" + "/editor.html/+"<Page path>"+"html"

you can check below example to get hostname info. 

https://experienceleague.adobe.com/docs/experience-manager-64/developing/platform/externalizer.html?lang=en 

 

 

1 reply

Siva_Sogalapalli
Community Advisor
Siva_SogalapalliCommunity AdvisorAccepted solution
Community Advisor
January 6, 2023

You can construct the AEM url in the sling model and use the same while sending email.

1. First get the current page path using Page object.

@586265

private Page currentPage; 

2. Use Externalizer to get the hostname and the construct complete url ("<hostname>" + "/editor.html/+"<Page path>"+"html"

you can check below example to get hostname info. 

https://experienceleague.adobe.com/docs/experience-manager-64/developing/platform/externalizer.html?lang=en