localgovdrupal / localgov_microsites

A repository for the LocalGov Drupal Microsites project.
GNU General Public License v2.0
3 stars 2 forks source link

Site 1 manager - create menu items on site 1 #39

Closed finnlewis closed 2 years ago

finnlewis commented 2 years ago

User story

As a site 1 manager I want to create menu items on site 1 So that I can add more content and allow people to navigate to it

Notes

This module seems favourite: https://www.drupal.org/project/group_content_menu

We're expecting two menus:

Make sure to... include this in the install config of the localgov_microsite_group module.... to ensure the menu plugin can be in the group - /admin/group/types/manage/microsite/content

Questions:

Acceptance tests

  1. Log into site 1
  2. Edit menus tab
  3. Add link to home page
  4. Add link to an external site
  5. Log out and see the menu
stephen-cox commented 2 years ago

Group Content Menu looks like it will do what we need of if.

One question is how do we want to place the menus? Menu blocks can be added to the primary and secondary theme regions or we can place them using field.

finnlewis commented 2 years ago

Thanks @stephen-cox, sounds good !

I think @markconroy and @ekes are best place to discuss the placement question.... could even render a block in a twig template based on options I imagine... anything to avoid config deployment issues, right?

markconroy commented 2 years ago

@stephen-cox don't place the menus anywhere for now, and once we get this merged and I play around with it, we can decide on the approach then.

ekes commented 2 years ago

[aside- as I ussume this is for the manager to add manually] On automatic creation of these - I guess that might be a thing? For the page in a group I'm adding a service to localgov_microsites_group which will create the node and assign it to the group. This I then call at the end of the wizard to add the content. But I figured that with a service it could be (a) used elsewhere (b) extended to clone content into a group, or add other different types of content (like a menu I guess)

stephen-cox commented 2 years ago

@ekes groups menus can be created automatically when a group is created. This strikes me as the simplest thing; create 2 menus that are only rendered if there's anything in them, but menu creation could be done as part of the group creation wizard.

It's a simple configuration option that can be turned on or off, so I will leave it turned on for now, but would be easy to turn off.

stephen-cox commented 2 years ago

@markconroy There's a PR adding main and utility menus here: https://github.com/localgovdrupal/localgov_microsites_group/pull/16

They still need to be placed on the page. It would be easy enough to place blocks in the primary and secondary menu regions, but these don't look to be rendered the localgov_microsite_base theme

finnlewis commented 2 years ago

@markconroy passing this to you to render the menu blocks.

stephen-cox commented 2 years ago

I'm adding regions to the theme so will create a PR adding blocks for this

stephen-cox commented 2 years ago

Done with https://github.com/localgovdrupal/localgov_microsites_base/pull/11