Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

ASK Published URL function

Avatar

Level 1

Dear team,

 

Do you know is there a "published URL" function AEM of each page or when is it released?

 

Kind regards,

Kaoru

kaorut_0-1629619035726.pngkaorut_1-1629619062013.png

 

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Yes, you are right, there is no such functionality. Because in many cases it's not that easy to deduce this information, and maybe this information is not even available on the authoring UI.

 

The most simple approach is: Just take the content path of a page, prepend it with the "publish domain" and append ".html".

 

For example:

* content path: /content/wknd/us/en/adventures

* publish domain: wknd.site

=> resulting URL: https://wknd.site/content/wknd/us/en/adventures.html

 

Some reasons why it's not easy:

  • There is no single hostname/domain name for all the pages, but parts of the content tree are mapped to different hostnames/domain names.
  • URLs are rewritten
  • On author not all of this data is necessarily available, so that this transformation cannot work there.

 

That means when you start on https://wknd.site, you actually up on the same page, but a different URL https://wknd.site/us/en.html

 

I think that in AEM this is a feature which is hard to implement product-side, because this would require a much more restrictive way how to implement the concept of "websites", which is currently totally left to the developing party. There are definitely some best practices around, but from a product perspective it's not clear if this is always followed (and making a certain approach mandatory would be really hard to sell ...)

 

But in many cases a customization in the UI is possible, so your development team can implement it according to the "sites" concept they are persueing. But maybe there is a different way to solve your business problem, so can you share this problem with us?

 

Jörg

 

 

 

View solution in original post

5 Replies

Avatar

Employee Advisor

Hi,

what do you mean with a "published URL function"? Do you expect a field in the page properties or in the siteadmin navigation, which displays the URL under which this page is reachable (assuming that the page is published)?

 

Avatar

Level 1

Hello Jorg-Hoh san,

 

Thank you for your replaying. Yes, I would like to see easily with a function on a page properties or site or admin navigation or, when publishing. But, is not there function on the CMS?

For example, in "movable type". there is a "published URL" function...

 

Thank you,

Kaoru  

kaorut_0-1629678037213.png

 

Avatar

Correct answer by
Employee Advisor

Yes, you are right, there is no such functionality. Because in many cases it's not that easy to deduce this information, and maybe this information is not even available on the authoring UI.

 

The most simple approach is: Just take the content path of a page, prepend it with the "publish domain" and append ".html".

 

For example:

* content path: /content/wknd/us/en/adventures

* publish domain: wknd.site

=> resulting URL: https://wknd.site/content/wknd/us/en/adventures.html

 

Some reasons why it's not easy:

  • There is no single hostname/domain name for all the pages, but parts of the content tree are mapped to different hostnames/domain names.
  • URLs are rewritten
  • On author not all of this data is necessarily available, so that this transformation cannot work there.

 

That means when you start on https://wknd.site, you actually up on the same page, but a different URL https://wknd.site/us/en.html

 

I think that in AEM this is a feature which is hard to implement product-side, because this would require a much more restrictive way how to implement the concept of "websites", which is currently totally left to the developing party. There are definitely some best practices around, but from a product perspective it's not clear if this is always followed (and making a certain approach mandatory would be really hard to sell ...)

 

But in many cases a customization in the UI is possible, so your development team can implement it according to the "sites" concept they are persueing. But maybe there is a different way to solve your business problem, so can you share this problem with us?

 

Jörg

 

 

 

Avatar

Community Advisor

Hi @kaorut ,

 

Please explain the business requirement for this, may be then should be able to help more. Published URLs (short URLs or the end site URLs) are dynamic in nature and depends on business decision. For example -

 

https://<host>:<port>/content/mysite/en/home.html

 

can be shortened to 

 

www.mysite.com

www.mysite.com/home.html

www.mysite.com/home

www.mysite.com/itsmypagename, and so on

 

Nevertheless, in case you want to store the URL on page, you can create custom page properties, workflow process, and there are multiple ways.

 

Hope it helps!

 

Avatar

Community Advisor

Hi @kaorut 

   There are others rules  (dispatcher url rewrites , URL shortening) which gets applied on Publishers only. Normally we don't apply resource resolver or url rewrites on authors as they may break some functionalities.

What is the exact use case ,may be there are some others options available.

 

Thanks

Dipti