Expand my Community achievements bar.

SOLVED

Adding field in touch ui dialog to define node name of page

Avatar

Level 1

Hi team,

 

In Touch UI you can only enter a page title and the page name (node name) is saved automatically based on the input in the title field. I have now the requirement to add this field in the dialog so that the author is able to specify besides the page title also the technical node name of the page.

 

Does anybody here in the community has a hint how this can be achieved?

 

Thanks and regards

Martin

1 Accepted Solution

Avatar

Correct answer by
Level 2

Hi @martinr81759641 ,
we can extend page properties for any customisation.
Please take a look on below Adobe learnings URL:
https://experienceleague.adobe.com/docs/experience-manager-learn/sites/developing/page-properties-te...

Hope it helps!
Thank you

View solution in original post

4 Replies

Avatar

Correct answer by
Level 2

Hi @martinr81759641 ,
we can extend page properties for any customisation.
Please take a look on below Adobe learnings URL:
https://experienceleague.adobe.com/docs/experience-manager-learn/sites/developing/page-properties-te...

Hope it helps!
Thank you

Avatar

Adobe Champion

Changing the node name on the fly would be rather costly from an effort perspective (as you need to make sure all references to that page are adjusted, plus managing un/publishing operations too).

 

If the goal is to control the name in the URL, maybe sling:alias (Alias field in page props) would be the way to go.

Avatar

Community Advisor

Hi @martinr81759641 

 

When you say you want to give the flexibility to author to specify the node name of the page, do you mean by the URL?

 

If that;s the ask then I will suggest you to refer the sling:alias property that is available OOTB with the page property. 

 

Please refer the link below:

https://sling.apache.org/documentation/the-sling-engine/mappings-for-resource-resolution.html

http://www.sgaemsolutions.com/2019/02/usage-and-best-practices-of-page.html

 

Please Note: Alias won’t work in publish instance until you provide jcr:read permission for “/” for anonymous user. You just need to select root but you can deselect permission inside (like apps,etc etc ) root, because when you use sling:alias this particular logic (shown in the image below ) internally runs and if anonymous user don't have read access of “/” then it won’t work in publish.

 

asutosh_jena_0-1631182339156.png

 

Thanks!

Avatar

Level 1

Thanks for the fast and constructive feedback.

 

I have checked the out-of-the-box implementation and it already support defining the node name of a page. I have to check with my other colleagues why it has been customized to not to use the OOTB feature.

 

Kind regards

Martin