Skip to content

Excluding a page from the sitemap also excludes its children #62

@bogdancondorachi

Description

@bogdancondorachi

Hello @fabianmichael, not sure if this is intended or not.

If you are trying to exclude a template/s or a page/s from sitemap in config it also excludes its children by default.

Now in my use case, I have a page template and that page acts as a redirect to it's first children. And I need to exclude the parent template to solve some google console issues.

To do so I've manually removed the following from isPageIndexible function:

if (! is_null($page->parent())) {
    // test indexability of parent pages as well
    return static::isPageIndexible($page->parent());
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions