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

Allow pageTypeWhitelist to exclude adding to sitemap for all page types except #512

Open
kszymukowicz opened this issue Dec 29, 2017 · 2 comments

Comments

@kszymukowicz
Copy link

MetaSEO version: 3.0.0
TYPO3 version: 8.7.0
PHP version: 7.1.0

Currently there is setting plugin.metaseo.sitemap.index.pageTypeBlacklist that allows to build comma separated list of all page types that I do not want to be included in sitemap.

This works well but unfortunately it is very hard to keep it up to date because after installing new extension (or even after updating some existing) I must check if extensions provides some new page types which I should add to pageTypeBlacklist :(

This is why its much more convenient to have setting like plugin.metaseo.sitemap.index.pageTypeWhitelist.

For almost 99% of my cases I would have it only one value
plugin.metaseo.sitemap.index.pageTypeWhitelist = 0

And I will not have to remember to update 'pageTypeBlacklist' after installing/updating extensions.

Please let me know if you agree with that - if yes I can prepare PR then.

Thank you!

@thomaszbz
Copy link
Member

thomaszbz commented Dec 29, 2017

In principle, this is a valid feature request. plugin.metaseo.sitemap.index.pageTypeWhitelist should again be a list of comma separated values.

We'd just have to say how to deal with a whitelist and a blacklist combined. And how to avoid introducing new breaking changes.

One way would be

  • Default to an empty pageTypeWhitelist
  • Keep the existing behaviour if pageTypeWhitelist is empty
  • Ignore pageTypeBlacklist if pageTypeWhitelist is not empty

This should of course be part of the documentation so that everybody gets it.

If you are ready to provide a PR, please go for it!

kszymukowicz added a commit to kszymukowicz/TYPO3-metaseo that referenced this issue Jan 7, 2018
kszymukowicz added a commit to kszymukowicz/TYPO3-metaseo that referenced this issue Jan 7, 2018
@thomaszbz thomaszbz added this to the 2.1.1 milestone Jan 7, 2018
@thomaszbz
Copy link
Member

thomaszbz commented Jan 7, 2018

@kszymukowicz Thanks for the patch. Just by looking at the code you provided, it looks pretty much as it should be ;-)

I'll port it back to 2.1.1 to make it available to 6.2/7.6 users as well.

@thomaszbz thomaszbz assigned thomaszbz and unassigned kszymukowicz Jan 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants