Shorten URL in model.json output

BigT168 07-06-2018

Defined URL mappings in the Apache Sling Resource Resolver Factory of AEM 6.3 SP2, tested the url shortening in the Adobe Experience Manager Web Console Resource Resolve, it works fine.

However, when I run page.model.json, none of the URL is shortened. Not sure if this is the way how model.json works, not integrated with configuration. Or may in near future, there is an enhancement.

Please let me know.

At the same time, any suggestions to output the URL shortening, especially when I use core component, such as list component, to output a list of pages, I need the shorten URL.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Jörg_Hoh
Employee
07-06-2018

Hi,

that's indeed expected behaviour. In the HTML rendering the Link Rewriter does the URL shortening, while it does not kick in when you use Sling Model Exporter to export the very same Sling model.

The only chance I see is to do the shortening already in the Sling Model exporter (at the paths which need or can to be shortened at all).

Jörg

Answers (4)

Answers (4)

BigT168 07-06-2018

in AEM 6.3, Adobe introduces the model.json. When you have a list of pages, you can put core list component as parent of these pages, then list.model.json will output some properties of each child page.

What I am asking is the model.json output the path and URL of each child page , but both path and URL are not shortened. Is this expected behavior?