TYPO3 TCA how to set pages max title length

747 Views Asked by At

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

2

There are 2 best solutions below

5
Thomas Löffler On BEST ANSWER

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
);
2
Georg Bez On

Are you sure that this is correct? My approach is this:

TCEFORM.pages.title.config {
    max = 250
    size = 250
}

It also works in the form, but it still gets truncated on save. I have deleted caches. What have I overlooked?