Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not respect Mount Point #83

Open
linxpinx opened this issue Jul 13, 2017 · 1 comment
Open

Does not respect Mount Point #83

linxpinx opened this issue Jul 13, 2017 · 1 comment

Comments

@linxpinx
Copy link

linxpinx commented Jul 13, 2017

I have multiple Domains with their own Rootpage in a T3 Installation. So i set for every Domain forceStartPid to the Pid of the Rootpage. There are Mountpoints in this Sitemap mounting to other Sides in another Domain. dd_googlesitemap did not get the right doctype. So i add to
/Classes/Generator/PageSitemapGenerator.php Function shouldIncludePageInSitemap

return !$pageInfo["no_search"] && !in_array($pageInfo["doktype"], $this->excludedPageTypes) && !$pageInfo["_MP_PARAM"];

And same Class Function generateSitemapContent
if (!$pageInfo['_MP_PARAM']) { $morePages = $GLOBALS['TSFE']->sys_page->getMenu($pageInfo['uid'], '*', '', '', false); $this->removeNonTranslatedPages($morePages); $this->pageList = array_merge($this->pageList, array_values($morePages)); unset($morePages); }

Is this ok and can you add it to the next Version?

Thx and greetings

Bernd

@linxpinx
Copy link
Author

I made it more general. You can set excludeParameters in Typoscript. Now function shouldIncludePageInSitemap looks like this:

` foreach($this->excludeParameters as $valueParameter)
{
// check if one Parameter is TRUE
if ($pageInfo[$valueParameter]) {
$this->dontRenderPage = TRUE;
}
}

    if (!$pageInfo['no_search'] && !in_array($pageInfo['doktype'], $this->excludedPageTypes) && ($this->dontRenderPage === FALSE)) 
    {
        return TRUE;
    } else {
        $this->dontRenderPage = FALSE;
        return FALSE;
    }`

and function generateSitemapContent looks like this:
foreach($this->excludeParameters as $valueParameter) { // check if one Parameter is TRUE if ($pageInfo[$valueParameter]) { $this->dontRenderPage = TRUE; } } if ($this->dontRenderPage === FALSE) { $morePages = $GLOBALS['TSFE']->sys_page->getMenu($pageInfo['uid'], '*', '', '', false); $this->removeNonTranslatedPages($morePages); $this->pageList = array_merge($this->pageList, array_values($morePages)); unset($morePages); } else { $this->dontRenderPage = FALSE; }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant