omz13 / kirby3-xmlsitemap

kirby3 plugin to generate an xml-based sitemap
59 stars 10 forks source link

Include listed pages of parent draft #45

Open muttenzer opened 3 years ago

muttenzer commented 3 years ago

Hello David,

Thank you for your great plugin!

I have a quick question: Is it possible to include listed pages of a parent draft in the sitemap?

I have a parent page(microcases) which has a status of draft and some children pages(microcases-case) with the status listed. The microcases page doesn't exist, it only fulfills the purpose of a "bucket". The microcases-case pages are listed on the homepage of the website and linked from there. There is no menu entry for the microcases-cases. I tried to use a combination of includeUnlistedWhenTemplateIs and includeUnlistedWhenTemplateIs. Unfortunately, it didn't work out because the children of unlisted pages are ignored even though they are set as listed. Which does sort of makes sense, but in my case is what I would like to have:

example.com/microcases => not visible in sitemap (unlisted in kirby) example.com/microcases/case-a => visible in sitemap (listed in kirby) example.com/microcases/case-b => visible in sitemap (listed in kirby) example.com/microcases/case-z => visible in sitemap (listed in kirby)

I would appreciate your help on that issue. Thank you a lot!

Best, Timo