Mapping to “pages” table from Extbase in TYPO3 6.1

前端 未结 2 1922
孤城傲影
孤城傲影 2021-01-13 12:13

I created an extension with a domain model Message. This model has a relation m:n with the TYPO3 pages (the one which has the details of the pages,

2条回答
  •  感情败类
    2021-01-13 12:46

    Is it possible that you didn't create the Pages domain model (within the extension builder or not at all)? The file my_ext/Classes/Domain/Model/Pages.php needs to exist. Check that your "Pages" domain model has the property Map to existing table set to pages, it should look like that:

    enter image description here

    I don't know where exactly your error is, but I did some more tinkering in the extension builder and made it work. You can probably find out by comparing your extension playfield to my temporary extension testfield: Download it here (updated).


    Btw, you don't need to map properties that you do not want to be displayed in the frontend unless they are named differently.

            mapping {
                tableName = pages
                columns {
                    title.mapOnProperty = title
                    subtitle.mapOnProperty = subtitle
                }
            }
    

提交回复
热议问题