Skip to main content
Level 4
October 16, 2015
Solved

restrict page component title length

  • October 16, 2015
  • 1 reply
  • 906 views

Hi,

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

 

Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by BrianKasingli

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

 

1 reply

BrianKasingli
Adobe Champion and Community Advisor
BrianKasingliAdobe Champion and Community AdvisorAccepted solution
Adobe Champion and Community Advisor
July 26, 2023

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