localgovdrupal / localgov_services

Provides the pages and navigation for presenting the Services provided by Local Government. A part of the LocalGovDrupal distribution.
GNU General Public License v2.0
3 stars 5 forks source link

Allow Subsites to be parents not just Services #259

Open dedavidson opened 6 months ago

dedavidson commented 6 months ago

Currently all the content types such as Directories, Guides etc have a parent field localgov_services_parentwhich only references Services. This uses a plugin implementation in modules/localgov_services_navigation/src/Plugin/EntityReferenceSelection/ServicesSelection.php which is why I have opened the issue here.

Similar to #211 the use case is when a Subsite needs to include service pages, Directories or Guides.

Correcting this properly in my mind would require changes to all the modules that provide parent linkage so that it doesn't refer to just Services. That is a large task so a more pragmatic approach might be just to change the plugin implementation to allow both the localgov_subsites_overview and localgov_guides_overview bundles. Individual sites can then enable them if they wish to allow parentage other than just Services.

willguv commented 6 months ago

Thanks @dedavidson

How are the relationships made between subsite overviews and other page types in the H&F set up please @justinepocock @rupertj ?

rupertj commented 6 months ago

@willguv Depends which relationships you mean. Do you mean including them in the subsite, or something else?

If that is what you mean, it's all determined by the menu. There's special handling for directories to let directory pages in if you put their directory channel under a subsite homepage in the menu. I've opened an issue on subsites_extras to allow that to be extended for guides and other page types that have the same page/overview page structure. (Although the H&F web team worked around that by putting every guide page in the menu.... Not ideal, but it did work!)

dedavidson commented 6 months ago

@rupertj will that change the breadcrumb for the directory so that it "feels" part of the subsite?

rupertj commented 6 months ago

It doesn't do anything with the breadcrumbs. They just worked anyway from what I've seen.

For example, here's one of H&F's directories in a subsite: https://www.lbhf.gov.uk/children-and-young-people/family-hub/find-family-hub-or-childrens-centre

willguv commented 6 months ago

Hi @rupertj I meant including them in the subsite. Thanks