Expand my Community achievements bar.

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

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

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"/>