I’m using @pedroborges sitemap plugin on a multilanguage site.
The blog only exists in the default language, and I would like to filter all the alternate language links for blog and its children pages.
I tried this, but it doesn’t work:
c::set('sitemap.process', function($pages) {
return $pages->filter(function($page) {
return $page->content(site()->language()->code())->exists();
});
});
Any help?