- πΊπ¦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?
- Merge request !70Issue #3129303 by hideaway: Allow to alter entity url generator query β (Closed) created by andriy khomych
- last update
over 1 year ago 32 pass - πΊπ¦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.
-
walkingdexter β
authored 159d01bd on 4.x
Issue #3129303 by andriy khomych, hideaway, gbyte, bvoynick, berdir,...
-
walkingdexter β
authored 159d01bd on 4.x
- π·πΊRussia walkingdexter
The necessary hooks are already in the core. All we need to do is add tag and metadata to the query.
Automatically closed - issue fixed for 2 weeks with no activity.