Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list
SOLVED

Can Page Naming Conventions be cumtomized?

Avatar

Level 2

I want to cumtomize the Naming Convention rules and add a sequence id to page name.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @LiYanfei, in terms of technical approach that could be used, I see following options:

Backend oriented - in general it will apply the change after page was created or copy/pasted.

Mix of frontend and backend - this approach assures that desired page name is generated before it is saved in the repository.

  • Create Sling servlet that will generate/expose sequence id you would like to add to the page name. Create javascript that will call the servlet and will automatically update page name on page creation/update GUI wizard.

 

View solution in original post

1 Reply

Avatar

Community Advisor

Can you explain a little bit:

- Do you need to change name of existing pages?

- If you crate new page, you have to name the page. Do you want this to be automated/customized so that it takes a default value?

Avatar

Level 2

- Not applied for existing pages. Applied for page create and page copy.

- I want to be automated/customized.

Avatar

Community Advisor

I think @lukasz-m covered almost all the ways you can achieve this. 

You can achieve the same by going any of the ways described.

 

- Backend Oriented : Best way to go for Long Term Support.

- Frontend Oriented : Fastest and easiest way, although , you may need to make changes if Adobe changes the class names of the dialog in a new SP or version.

 

I would personally go with the front end oriented as it cannot impact performance.

Just write a event listener on "Create Page" button in JS and write a small function which will automatically add the filename/pattern you are looking for through code.

Avatar

Correct answer by
Community Advisor

Hi @LiYanfei, in terms of technical approach that could be used, I see following options:

Backend oriented - in general it will apply the change after page was created or copy/pasted.

Mix of frontend and backend - this approach assures that desired page name is generated before it is saved in the repository.

  • Create Sling servlet that will generate/expose sequence id you would like to add to the page name. Create javascript that will call the servlet and will automatically update page name on page creation/update GUI wizard.