0
votes

I'm currently working on a scheduler task to render a XML feed of all pages of a TYPO3 site and save this feed as a file.

Therefore I need all pages of this site, so all sub pages of one root page.

Any ideas how to do this without the usage of the TSFE (TypoScript Frontend Controller)? I would like to avoid the initialization of the TSFE in backend context. Or is there a good way to do this in TYPO3 v10.4?

1
Did you take a look of the Google sitemap generation of the EXT:seo backend module? Maybe that's a good start or even an alternative?Thomas Löffler
yes, this was also my idea. but the sitemap.xml is created in the frontend context or is there a hidden backend module?mhirdes

1 Answers

2
votes

You can use \TYPO3\CMS\Core\Database::getTreeList($id, $depth) to fetch all pages recursive for the given page uid and depth. This returns a list of all descendant page uids, which you later can use to fetch all page records.