webdevops / TYPO3-metaseo

TYPO3 MetaSEO Extension
https://typo3.org/extensions/repository/view/metaseo
GNU General Public License v3.0
38 stars 24 forks source link

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

Open kszymukowicz opened 6 years ago

kszymukowicz commented 6 years ago

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 commented 6 years ago

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

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!

thomaszbz commented 6 years ago

@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.