Skip to content
This repository has been archived by the owner on Nov 9, 2021. It is now read-only.

Add Entity Reference Hierarchy module to GovCMS8 #476

Open
pameeela opened this issue Jul 8, 2020 · 10 comments
Open

Add Entity Reference Hierarchy module to GovCMS8 #476

pameeela opened this issue Jul 8, 2020 · 10 comments
Labels
enhancement Module Module requests and discussion

Comments

@pameeela
Copy link
Contributor

pameeela commented Jul 8, 2020

https://www.drupal.org/project/entity_hierarchy

** What value does this module/package add to GovCMS?
This module allows the creation of large content hierarchies with built-in views support, without bloating the menu system or hurting performance.

It also allows the easy creation and maintenance of sub-sites.

** Please provide a brief outline of what this module does.
Entity hierarchy extends the standard Entity Reference field to store a nested set representation of the the hierarchy. This allows for efficient querying of the hierarchy.

** Who does this module benefit:
[x] end users
[x] content editors
[x] site builders
[x] themers
[x] developers

** How could you provide/replicate the functionality of this module using alternative methods, eg in your theme?
It's not possible to replicate this in your theme. You can use standard entity references to try to build a hierarchy but it wouldn't have full views support and has other obvious limits.

** If this module styles or alters HTML or JavaScript output, can the functionality be provided via the theme?
No

** What is the maintenance and support status of the module. Describe the issue queue activity.
Active and well maintained. Drupal 9 compatible and the latest release was in late June.

** What permissions are needed to utilise the module (and are any new permissions provided by the module)?
The module adds a single permission: 'Reorder children'

** Does the module modify the database structure and/or store additional metadata on nodes or other entities? If so, why? What are the risks for future updates?

** Is the module designed to capture anonymous user data?
No

** Is the output of the module typically fully cacheable?
Yes

** What is your assessment of the quality of this module, the contribution history of the module's maintainers, and the uptake of the module within the Drupal community?
larowlan is the maintainer and I think his contribution history speaks for itself, but I will note that he is a Drupal core committer, the only one based in Australia, and a member of the Drupal security team.

** Additional information
It is quite a common request for clients to be able to easily create sub-sites within their GovCMS SaaS sites. This module would greatly expand the capability to deliver this and would allow sites to better incorporate content that might otherwise be developed as a separate site. I think that it would be a great addition to the SaaS feature set to empower content editors to have this flexibility.

@simesy simesy added the Module Module requests and discussion label Jul 8, 2020
@simesy
Copy link
Contributor

simesy commented Jul 8, 2020

I have so much theme code to compensate for a lack of this module. Plus one billion.

@Els-SLHD
Copy link

Els-SLHD commented Jul 9, 2020

...+++
Very necessary for single/centralised governance of complex organisations who have a breadth of unique customers

@brett-sargeant
Copy link

agree

@Belhendo
Copy link

@pameeela, @simesy, @Els-SLHD @brett-sargeant

Thanks for the information and suggestion, we will investigate and I will get back to you.

@drupal-spider
Copy link
Contributor

Is there any documentation about how to use and configure this module available online?

@larowlan
Copy link

larowlan commented Jul 17, 2020

👋 Happy to answer questions on this module

Some major sites using and contributing to this module in Australia

  • uts.edu.au (has been in production for around 4 years)
  • cdu.edu.au
  • service.nsw.gov.au
  • nsw.gov.au
  • future-students.uq.edu.au

In terms of using and configuring this module:

  • add a new field of type "Entity reference hierarchy" to a content type. Typically this field would be named 'Parent'
  • Create content as usual and nominate the parent page in this field as appropriate
  • Views can generate lists of children, grandchildren, parents, grandparents etc
  • Path aliases and breadcrumbs can reflect the hierarchy

Things that warrant highlighting here

  • the tree hierarchy is stored using a nested set which means you can query arbitrary hierarchies from the database in a single query, without the need to query recursively
  • the module relies on a php library for handling nested sets
  • this library uses doctrine DBAL for its DB access, as it is framework agnostic
  • the module relies on the DBAL module which was written for this module and I also maintain for seamless wiring of existing database connections to DBAL
  • the module follows my standard contrib release process - a new version is released for each bugfix, release early release often.
  • the module is extremely well tested and follows the same level of rigour as core development - no bugfixes/features without test coverage

Other goodies the modules has

  • A sub-module for powering micro-sites. This allows admins to pick a node in the hierarchy and designate it as the root of a micro-site. This exposes block visibility rules and a custom menu block. Each microsite can have its own menu/logo/blocks but live in a single site. example URL cdu.edu.au/riel
  • A sub-module for Integration with workbench access, add a boolean field to a content type 'Use as an editorial section' and any node in the tree can become a separate editorial section. Allows you to limit content editing based on the site hierarchy
  • A sub-module for custom breadcrumbs, have breadcrumbs that follow the hierarchy even if URL aliases don't

@larowlan
Copy link

Screenshot of a sub-set of the automated testing
image

See the results on drupal.org for full details (click All to expand)

@Belhendo
Copy link

Thank you @larowlan and others

We are currently investigating and will get back to you when we have more info.

Belinda

@sonnykt
Copy link
Contributor

sonnykt commented Aug 26, 2020

This module is also used by Victorian SDP for all sites under vic.gov.au.

@jibran
Copy link

jibran commented Aug 19, 2021

This has been done in govCMS/GovCMS#236

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Module Module requests and discussion
Projects
None yet
Development

No branches or pull requests

9 participants