Search code examples
selecttypestypo3dropdown

TYPO3 8.7: Set page type programmatically


Being new to TYPO3, I'm interested in finding out, how I can add a TYPO3 page type in the backend on page creation programmatically.


Solution

  • As you can find in the manual you can set a default value for each field of any table with Page-/User-TSconfig.

    general:

    TCAdefaults.<table>.<field> = <value>
    

    specific:

    TCAdefaults.pages.doktype = 123
    

    (replace 123 with your doktype)