Search code examples
javaaem

Adobe Experience Manager full URL to path


I have a component which allows the user to point to a resource using granite/ui/components/foundation/form/pathbrowser. The component then creates share links eg. sms: and mailto: links for the page.

How can I get the full URL in the javascript use-api so these links work and don't just point to content/pages/example_page?


Solution

  • You can configure and use Externalizer OSGI service to create absolute urls. Please see the documentation here for detailed information: https://helpx.adobe.com/experience-manager/6-3/sites/developing/using/externalizer.html

    I guess you can use the same way with js use-api.