Skip to content

Alter Sitemap's items with results from new event #9530

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Alter Sitemap's items with results from new event #9530

wants to merge 1 commit into from

Conversation

navarr
Copy link
Member

@navarr navarr commented May 5, 2017

Description

Add an event "sitemap_prepare_items" that sends the items and the store id out, allowing customizations to add, modify, or remove items for the sitemap generation.

Manual testing scenarios

  1. Create an observer for sitemap_prepare_items
  2. Add to the items an DataObject in the same format as the sitemap expects
  3. Ensure the new item is in the generated sitemap.xml file

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

Add an event "sitemap_prepare_items" that sends the items and the store id out, allowing customizations to add, modify, or remove items for the sitemap generation.
@ishakhsuvarov
Copy link
Contributor

Hi @navarr
Usually we avoid adding dispatching any new events in the core code, just maintain the existing ones. Do you think it is possible to refactor the code in such way to allow usage of plugins to achieve the same result?
Thanks

@navarr
Copy link
Member Author

navarr commented May 8, 2017

Absolutely.

Let me review the newish core code style stuff and I'll make a new PR in the future.

Is there a good way to discuss suggested implementation, or should I just approach with one and use the feedback from that to refine it?

@navarr navarr closed this May 8, 2017
@ishakhsuvarov ishakhsuvarov self-assigned this May 8, 2017
@ishakhsuvarov ishakhsuvarov added this to the May 2017 milestone May 8, 2017
@ishakhsuvarov
Copy link
Contributor

@navarr I think It would be good if you submit one and we discuss.
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants