Issue Feature Closed

#94206additionalWhere for getting Tree in PagesXmlSitemapDataProvider

Christoph Lehmann 05/27/21, 07:59 updated 09/07/21, 07:41

Description

I like to be able to exclude parts of the page tree completely in sitemap.xml without setting (for example) no_index=1 on every page.

Proposal

plugin.tx_seo {
    config {
        xmlSitemap {
            sitemaps {
                pages {
                    provider = TYPO3\CMS\Seo\XmlSitemap\PagesXmlSitemapDataProvider
                    config {
                        additionalWhereTree = AND uid NOT IN ({$constant.list.with.pageUids})
                    }
                }
            }
        }
    }
}

The new option additionalWhereTree needs to be passed to $cObj->getTreeList() in getPages()

Reviews 1