Expand my Community achievements bar.

Adobe Summit 2025: AEM Session Recordings Are Live! Missed a session or want to revisit your favorites? Watch the latest recordings now.
SOLVED

restrict page component title length

Avatar

Level 4

Hi,

When you select new page on site admin how do you restrict the page title to be a certain size.

 

Thanks

1 Accepted Solution

Avatar

Correct answer by
Community Advisor and Adobe Champion

You can overlay the Granite UI from the page properties, and provide the maxlength property. Example like (maximum length is 100 characters):

 <title
    jcr:primaryType="nt:unstructured"
    required="true"
    name="./jcr:title"
    maxlength="100"
    sling:resourceType="granite/ui/components/coral/foundation/form/textfield"/>

 

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor and Adobe Champion

You can overlay the Granite UI from the page properties, and provide the maxlength property. Example like (maximum length is 100 characters):

 <title
    jcr:primaryType="nt:unstructured"
    required="true"
    name="./jcr:title"
    maxlength="100"
    sling:resourceType="granite/ui/components/coral/foundation/form/textfield"/>