[TYPO3-mvc] How to use the table "pages"?

Tobias Pinnekamp tobias.pinnekamp at itao.de
Mon Jun 21 17:45:21 CEST 2010


Am 21.06.10 11:55, schrieb Tobias Pinnekamp:
> Hi all,
>
> I need to use the pages-table in my extension. With the frontend users
> there is a model shipped with extbase. I created based on this a model
> for a page and configured the mapping in TS. But how will it work with
> the storagePid? This can't be handled equally to other domain objects
> because pages aren't stored under the same pid, which is quite obvious.
>
> Any idea/solution how to work with page domain objects with extbase?
>
> Thx in advance
> Tobias

I digged a little into the code and the generated sql statement to fetch 
a page or all pages has a condition in it like the following


SELECT  pages.* FROM pages  WHERE 
(pages.doktype='Tx_MyExtension_Domain_Model_Page') AND pages.deleted=0 
AND .......  AND pages.pid IN (0)


The pid-condition is ok so far, because it belongs to the configured 
storagePid for the extension (but which is in general for pages a little 
bit "inconvenient"). But why is there a doktype-condition? My guess is, 
that it is generated because that field is configured as type-field in TCA.


More information about the TYPO3-project-typo3v4mvc mailing list