To reuse an existing Menu the user may select a menu from the dropdown that appears when clicking on Select menu in the block interface. In contrast, all presentational attributes remain local to the block instance itself and are not persisted to the Navigation Post.īy using a centralised data source, this “controlled” Navigation block affords reuse of Menus within the site and/or across Themes whilst still allowing for menus to be styled differently as required. data) to a new wp_navigation custom post type which has been added to WordPress Core.Ĭhanges made to the menu items within the Navigation block are automatically synchronised to an underlying Navigation Post. To facilitate this goal, the Navigation block has been designed to save its “items” (i.e. The primary aim of this effort has been to allow for the easy reuse of menus across different Themes, whilst allowing Theme authors to apply different stylistic treatments to their navigation areas. Reusing Navigation Menus and separation of concernsĪ key consideration when creating a block based navigation system has been to decouple the presentation of the Navigation block from its data (i.e. This guide will dive deeper into some of the more technical aspects of the block’s functionality. please see the Navigation block support page. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. WordPress 5.9 sees the introduction of a Navigation block which allows users to create, manage, and reuse menus built with various blocks from page links to site logos and more.įor full information on using the block Block Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor.
0 Comments
Leave a Reply. |