Problem/Motivation

Currently, links for sub-modules are added to the toolbar, but this does not scale well with many installed example modules. Furthermore, the Toolbar module is going to be deprecated and removed; whichever method is used to show links for the installed sub-modules, that should not require them to know which module is responsible for rendering the toolbar.

Proposed resolution

  • Create a new page listing all the installed sub-modules
  • Define a hook that sub-modules need to implement in order to be linked in the page showing all the installed example modules
  • Change all the sub-modules to use the new hook (in follow-up issues)

Issue fork examples-3585588

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

avpaderno created an issue. See original summary.

avpaderno’s picture

Issue summary: View changes

oily made their first commit to this issue’s fork.

oily’s picture

The 'admin menu' in gitlab is similar in appearance to the Drupal admin menu in version 11.4 and newer. The links are in a sidebar on the left hand and the parent links have icons to the left. It seems good UX, therefore, to create a parent link for 'Examples'.

To generate the 'Examples' link in the left (navigation) sidebar I created a controller and examples.menu.links.yml and examples.routing.yml with a 'system' route. The path is 'admin/examples' as it is in version 4.0.x.

I am planning to adjust the paths in the *_example.routing.yml files to e.g. admin/examples/block-example. That settings pages for the submodules should be displayed when you hover over the 'Examples' link in the left hand sidebar. They should be available as children of the root menu tree object.

oily’s picture

Status: Active » Needs work
avpaderno’s picture

Status: Needs work » Postponed

I am postponing this issue to other issues which remove modules or change their machine name.

oily’s picture

The examples link has been moved out of the navigation menu to the 'main' menu. The submodule links can be displayed as child links under the examples link. I have removed the /admin/ from the submodule paths.

The 'main' menu displays in other themes including 'Stark'. It displays at the top of Olivero theme pages whether or not the user is logged in.

avpaderno’s picture

Issue summary: View changes
avpaderno’s picture

Assigned: Unassigned » avpaderno
Status: Postponed » Active

avpaderno’s picture

Status: Active » Needs review
avpaderno’s picture

Status: Needs review » Reviewed & tested by the community

  • avpaderno committed bd954715 on 5.0.x
    Issue #3585588: Change how links for sub-modules are shown
    
avpaderno’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

avpaderno changed the visibility of the branch 3585588-change-how-links-for-submodules-are-shown to hidden.

avpaderno’s picture

Assigned: avpaderno » Unassigned