typo3typo3-8.xtypo3-tca

TYPO3 TCA how to set pages max title length


Our customer needs super long page titles. In the backend I found Configuration > TCA > pages > columns > title > config > max

So this would be the correct setting to increase the page title length right? But where can I add the mandatory TCA to increase the length and how would it look like?

Help is much appreciated.


Solution

  • You can override the TCA settings with PageTS (TCEFORM).

    Documentation is here: https://docs.typo3.org/m/typo3/reference-tsconfig/master/en-us/PageTsconfig/TceForm.html

    Example for your issue:

    TCEFORM.tt_content.header.config.max = <your value>
    

    But be sure that the table field in the DB may be increased as well. Then you need to add an ext_tables.sql file in your sitepackage extension and add:

    CREATE TABLE pages (
        title VARCHAR(<your value) DEFAULT '' NOT NULL
    );