-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
[Block] NavigationAffects the Navigation BlockAffects the Navigation Block[Feature] ExtensibilityThe ability to extend blocks or the editing experienceThe ability to extend blocks or the editing experience[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Description
The Navigation block has a hard-coded list of allowed inner blocks:
gutenberg/packages/block-library/src/navigation/edit.js
Lines 32 to 38 in d77994e
const ALLOWED_BLOCKS = [ | |
'core/navigation-link', | |
'core/search', | |
'core/social-links', | |
'core/page-list', | |
'core/spacer', | |
]; |
But plugins might want to add more blocks to that list. For example, WooCommerce could add a Product Search block or a minicart block (ie: a link to the Cart which shows the number of products in the cart).
If I'm not wrong, there is no way plugins can do that right now, so this issue is about making the ALLOWED_BLOCKS
list filterable or introducing some other API so plugins can extend the list of allowed blocks inside the Navigation block.
coreyworrell, lkraav, rocramer, fabiankaegy, eric-michel and 1 more
Metadata
Metadata
Assignees
Labels
[Block] NavigationAffects the Navigation BlockAffects the Navigation Block[Feature] ExtensibilityThe ability to extend blocks or the editing experienceThe ability to extend blocks or the editing experience[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Type
Projects
Status
Done