Provide a NavigationLinkBlock Plugin and use Help as an usage example

Created on 8 May 2024, about 2 months ago
Updated 14 June 2024, 16 days ago

Problem/Motivation

Providing a Single Link Navigation Block type could be useful for situations where a single item needs to be added to navigation and creating a new menu just for this purpose would be overkill and complex for editors.

A good example of this is the Help link in the current navigation. This is a single link and it was hardcoded in the NavigationUserBlock to avoid creating an extra menu.

If we add this new item, we could migrate Help link to be an usage of this block type and significantly simplify logic in NavigationUserBlock.

Related issues where complexity could be reduced:

๐Ÿ“Œ Investigate using the core "User account menu" in favor of custom Navigation Block for same Active
โœจ Add the user image to the user menu when available Active

Steps to reproduce

Current process to add a single link to page Foo in navigation:

  1. Go to Add Menu Page and create and arbitrary menu called Bar
  2. Edit the Bar menu and add menu item to Foo and its title
  3. Go to Navigation Layout page and add a new Bar Menu block
  4. Configure the Bar Menu Block to use 1st level and depth of 1
  5. Link to Foo is added to Navigation

Proposed resolution

Proposed flow to create a single link to Foo page to Navigation:

  1. Go to Navigation Layout page and add a new Link block
  2. Configure the Link block entering Foo route and title (Icon to be discussed)
  3. Link to Foo is added to Navigation

For now, this new block type will not be available to be added via UI. But created to make the work on the related issues smoother.

Remaining tasks

User interface changes

None. While we added a new Link block here, it is presently hidden from the general Block layout page as well as the Navigation layout page.

API changes

A new block with machine name navigation_link was added.

Data model changes

None.

๐Ÿ“Œ Task
Status

RTBC

Version

11.0 ๐Ÿ”ฅ

Component
Navigationย  โ†’

Last updated 2 days ago

No maintainer
Created by

๐Ÿ‡ช๐Ÿ‡ธSpain plopesc Valladolid

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024