Skip to content

Conversation

@bd-viget
Copy link
Contributor

Summary

This PR adds a feature to the core Navigation block that tracks the navigation menu's slug in the block attributes in order to keep menus with the same name, but different IDs, in sync across multiple environments (local, staging, production, etc.).

You should now see a refSlug attribute in the core Navigation menu attributes/JSON which stores the menu's slug (post_name).

Issues

  • N/A

Testing Instructions

  1. Create/update a template part/pattern and use the core Navigation block.
  2. Save the template/pattern changes to the theme (either with the Create Block Theme plugin, or manually by copy/pasting the blocks)
  3. Use a separate environment to create menus (they need to have different IDs to correctly test)
  4. The corresponding navigation menu should display when the Menu Names match, regardless if the IDs match.

Copy link

@nathan-schmidt-viget nathan-schmidt-viget left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, this will be really nice!!!

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.

4 participants