- πΊπ¦Ukraine andriy khomych
Well, this patch functionality can be useful and helps to filter out unrelated entities in sitemaps. Ideally, reworking this patch to events can be the best option. Moreover, isn't it a purpose for plugins to be flexible and take into account real cases?
- last update
over 1 year ago 32 pass - @andriy-khomych opened merge request.
- πΊπ¦Ukraine andriy khomych
Hey Pawel Ginalski.
First of all, thank you for this module, I remember times when it was the first really working D8 module.
Continuing the above discussion.I didn't see a problem to have hooks per plugin, when it is based on real cases it is okay.
Besides, was implemented something similar here:
ArbitraryUrlGenerator:public function getDataSets(): array { $arbitrary_links = []; $this->moduleHandler->alter('simple_sitemap_arbitrary_links', $arbitrary_links, $this->sitemap); return array_values($arbitrary_links); }
See https://git.drupalcode.org/project/simple_sitemap/-/commit/a26700d7ad1ee...
Moreover, this module is using the hooks approach and I don't think it is fine now to mix events and hooks.
Opened MR with the above patch proposal - https://git.drupalcode.org/project/simple_sitemap/-/merge_requests/70 - πΊπΈUnited States brockfanning
@andriy-khomych We would be interested in using that patch, however we have a need to apply a query alteration to only one particular sitemap, while leaving other sitemaps unaffected. Would it make sense to add another parameter to the hook that would let implementers only apply the alteration to certain sitemaps?
- πΊπ¦Ukraine andriy khomych
Well, it seems reasonable request, I think I can try to improve it.
I'll try to do it this week. - last update
over 1 year ago 32 pass - πΊπ¦Ukraine andriy khomych
Brock Fanning, updated, feel free to test MR.