public function sitemapIndex()
    {
        $pageLimit = 10000;

        if (isset($this->tsSetup['pageLimit']) && $this->tsSetup['pageLimit'] != '') {
            $pageLimit = (int)$this->tsSetup['pageLimit'];
        }

        $sitemaps  = array();
        $pageItems = count($this->sitemapPages);
        $pageCount = ceil($pageItems / $pageLimit);

        $linkConf = array(
            'parameter'        => GeneralUtility::getCurrentPid() . ',' . $GLOBALS['TSFE']->type,
            'additionalParams' => '',
            'useCacheHash'     => 1,
        );

        for ($i = 0; $i < $pageCount; $i++) {
            if ($this->indexPathTemplate) {
                $link = GeneralUtility::fullUrl(str_replace('###PAGE###', $i, $this->indexPathTemplate));

                $sitemaps[] = $link;
            } else {
                $linkConf['additionalParams'] = '&page=' . ($i + 1);

                $sitemaps[] = GeneralUtility::fullUrl($GLOBALS['TSFE']->cObj->typoLink_URL($linkConf));
            }
        }

        $ret = '<?xml version="1.0" encoding="UTF-8"?>';
        $ret .= '<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" '
            . 'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"';
        $ret .= ' xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 '
            . 'http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">';

        // Call hook
        GeneralUtility::callHookAndSignal(__CLASS__, 'sitemapXmlIndexSitemapList', $this, $sitemaps);

        foreach ($sitemaps as $sitemapPage) {
            $ret .= '<sitemap><loc>' . htmlspecialchars($sitemapPage) . '</loc></sitemap>';
        }

        $ret .= '</sitemapindex>';

        // Call hook
        GeneralUtility::callHookAndSignal(__CLASS__, 'sitemapXmlIndexOutput', $this, $ret);

        return $ret;
    }