Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate the services menu #82

Closed
andybroomfield opened this issue Oct 21, 2020 · 4 comments
Closed

Generate the services menu #82

andybroomfield opened this issue Oct 21, 2020 · 4 comments

Comments

@andybroomfield
Copy link
Contributor

Build out a menu that is a link to all service landing pages.
To aid building out the services mega menu in the theme, and to provide other themes with a menu for all services.
This could either be a view, or a menu where every service landing page gets an entry.

@andybroomfield
Copy link
Contributor Author

Should this be a config change so it defaults to adding every service landing page to the services menu, which means content designers could selectively exclude them. Or it could just be a menu that builds out all the service landing page.
Would need an update hook to install the menu and populate it with previously added service landing pages.

@andybroomfield
Copy link
Contributor Author

We could use Menu Force for this, but this forces a menu link to be added which I'm not so sure is what we want.

@ekes
Copy link
Member

ekes commented Oct 27, 2020

While I was working on https://github.com/ekes/localgov_campaigns/tree/feature/hierarchy I looked at how entity_hierarchy builds its microsite menus. [As it happens I opt-ed for building menus that theme the same but don't actually make menu items https://github.com/ekes/localgov_campaigns/commit/9a3e48578cd648df9a8cbb4e1c55fd90567b421a ] but anyway it does in code the control of menu items which might be of interest.

More generally Entity Hierarchy itself is overkill for the enforced maximum two level structure of services; but for Campaigns as seperate sections (or Engagement content or whatever) with an arbitrary menu structure and depth it made sense. Once there though it might make sense for other sections. It does make it very easy to pull up the full structure of all the campaigns (and would do the same elsewhere).

But back to controlling menu items. If you look at the code of entity_hierarchy_microsite it actually adds itself as a menu https://git.drupalcode.org/project/entity_hierarchy/-/blob/8.x-2.x/modules/entity_hierarchy_microsite/entity_hierarchy_microsite.links.menu.yml and adds menu items https://git.drupalcode.org/project/entity_hierarchy/-/tree/8.x-2.x/modules/entity_hierarchy_microsite/src/Plugin/Menu https://git.drupalcode.org/project/entity_hierarchy/-/tree/8.x-2.x/modules/entity_hierarchy_microsite/src/Plugin/Deriver ] Maybe of interest.

@andybroomfield
Copy link
Contributor Author

Closing as no longer required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants