Adding a column to the typo3 pages table calculated from the result of "strip_tags(title)"

139 Views Asked by At

In my typo3 installation, the page title field allows HTML and I'm trying to add a hidden "title_TagStripped" field to the pages table be able to include this new field to [Pages][ctrl][searchFields].

I'm a bit confused whether I need to create a TCA override for a passthrough type or a user type field or something else. My first try was a input type with an custom eval function but I don't know if it's possible to pass another field value to the evaluateFieldValue() function.

If anybody has pointers for this typo3 noobie...

Thanks

1

There are 1 best solutions below

0
David On

I suppose a passthru field for it is not advisable, likely the search would be unreliable if the field is not shown in the backend. I'd create a simple input field (like the title field) with the difference that the new field can't be edited.

Concerning the functional implementation you have several options

  • populating only if a record is saved.
  • populating by JavaScript if the title field is changed.
  • perhaps some other solution with ajax if there is some reason.

So you had to specify which option you prefer.