Search code examples
typo3typoscripttypenum

TYPO3. Add new page type with typeNum to TypoScript


I have this error in my extension:

Core: Exception handler (WEB): Uncaught TYPO3 Exception: #129458537: The page is not configured! [type=100][]. This means that there is no TypoScript object of type PAGE with typeNum=102 configured

So I want to add a new typeNum = 100 to the TypoScript, with a message to display in the FE, but dunno how!


Solution

  • You can simply define new typeNums in TypoScript like this:

    page = PAGE
    page.typeNum = 0
    page {
       # set properties ...
    }
    
    msg = PAGE
    msg.typeNum = 100
    msg {
       10 = TEXT
       10.value = My special message.
    }
    

    See: https://docs.typo3.org/m/typo3/reference-typoscript/master/en-us/Setup/Page/Index.html