Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Every child is excluded once a page has been excluded. #29

Open
zvaehn opened this issue Jul 16, 2019 · 1 comment
Open

Every child is excluded once a page has been excluded. #29

zvaehn opened this issue Jul 16, 2019 · 1 comment

Comments

@zvaehn
Copy link

zvaehn commented Jul 16, 2019

I have a multiple sibling pages for categories and i dont want them to be indexed, so i wrote the exlude rule:

'excludePageWhenTemplateIs' => ['category']`

Unfortunately this excluded all products as well, so i tried to add them via the addPages closure:

'addPages' => function() {
      $pages = new Kirby\Cms\Pages;
      return $pages->index()->filterBy('intendedTemplate', '==', 'product');
}

Folder Structure:

|-- Category 1
|---- Product 1
|---- Product 2
|-- Category 2
|---- Product 3
|---- Product 4

Am i missing something or is this intended behavior?
Any help is appreciated.
Sven

@foxacid
Copy link

foxacid commented Oct 16, 2019

I'm having the same issue for a very similar use case with excludePageWhenSlugIs. A fix would be very much appreciated. Thanks for a great plugin!

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

No branches or pull requests

2 participants