-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Create a legacy menu block #36576
Comments
Thanks for raising this @spacedmonkey. So this would effectively be an opt out similar to Questions:
Much appreciated. |
Hi @getdave, I can answer to the latest question and maybe partially to the third one and as you saw in the conversation on slack. In fact, in Polylang plugin we have a specific language switcher menu item we can use in the classic menu. It is specific because it is not a menu item as the other ones because it doesn't generate a simple link but several links (one per language). The current migration feature when we use the new navigation block produce for all the menu items a navigation-link block. We were looking for a solution when I asked a question on slack to know where the current conversion is done. I push here the video I previously pushed on slack to better illustrate what I explain. I would see an alternative: open the navigation block conversion to make it extensible and make possible to decide how to convert some menu-item. It's just an idea and what we were looking for at the beginning. However, it exists a disavandatage for our plugin. Indeed our navigation-language-switcher block is only implemented in our Pro version and then can't be used in our free version. |
@manooweb Thank you for your replies. It's great to have this use case requirement clearly illustrated. Let's keep this Issue specific to your later point regarding the (possible) need for a Legacy Menu block. I created a separate Issue in order that we can discuss the requirement for hooking into the conversion from classic Menu to Navigation block. Much appreciated 🙇 |
I created a prototype of a classic menu block. https://github.com/spacedmonkey/classic-menu-block After WordPress I will submit this plugin to the WP plugin repo. It will be a nice workaround for some of your issues @manooweb |
Wow! Thanks @spacedmonkey, I'm stuck at the moment with the other solution proposed in #36950 |
@spacedmonkey I took a look at your plugin. For the moment, here is what I get with your plugin renders a navigation block which doesn't contain the language switcher but a navigation link Otherwise in frontend it works correctly as the classic menu in the header Tested:
|
🤔Sorry after investigation, it seems that it's Polylang that doesn't manage the language switcher menu item in a admin/REST context. I'm going to test by moving a line of code a the right place and I let you know |
Is this something we are still considering implementing as a separate block? |
Hi @carolinan. For us - Polylang plugins - we still need this classic menu block. So, for all the users who use our plugin provided on WordPress.org it is the only solution to be able to use the language switcher in a menu with a site editor compatible theme. Regards. |
What problem does this address?
The current navigation block is not backwards compatible with existing menu / menu item code. This means that current implementations that filter / change menus, will not work.
What is your proposed solution?
Add a new legacy navigation block, that allows user to select menu a dropdown and have the menu be rendered server side with
wp_nav_menu
that would maintain backwards compatibility.The text was updated successfully, but these errors were encountered: