localgov icon indicating copy to clipboard operation
localgov copied to clipboard

Create a module that provides a dedicated homepage node type

Open joachim-n opened this issue 10 months ago • 10 comments

In slack:

Yes [the LGD demo module] uses subsite overview. I’d really like to create a module for a dedicated homepage at some point. A from subsites that could be upgraded over time?

CC @willguv

joachim-n avatar Feb 12 '25 17:02 joachim-n

Not sure why we don't package https://github.com/localgovdrupal/localgov_page already. It's what microsites uses for front page &c.

ekes avatar Feb 12 '25 17:02 ekes

My hunch is Subsites overview is closer to what main council sites need, although it doesn't do everything. I'd like to consider this towards the end of the Refresh project, but always good to keep the conversation going in the meantime

willguv avatar Feb 12 '25 17:02 willguv

LocalGov Page includes all our paragraph types and uses Layout Paragraphs for multi-column goodness, so should be able to do everything a Subsite overview page can do without all the extra subsites stuff.

stephen-cox avatar Feb 14 '25 13:02 stephen-cox

I kinda feel that even if LocalGov Page does all the things subsites overview does, it would still be good to have a specific, dedicated content type called "Homepage" to:

  1. Make it explicitly clear that this is what you use when creating a homepage, and
  2. It ensures that if you want different "things" (whatever that means - design, fields, permissions, etc) for just the homepage, it will be easy for any council to do that for their homepage content type without affecting the more generic "Page" content type.

markconroy avatar Feb 15 '25 18:02 markconroy

Having a Page and a Home Page modules and content types - both of which are features that are wanted - that (largely and often completely) duplicate themselves, one of which is only required for a single node has smells for me.

Plus isn't adding localgov_page which already exists, and requires no additional dev, and is supported for homepages because it's used by microsites, is the quick win here? Extending some custom submodule direction to the homepage, or making a default on install like microsites would be the nice addition?

ekes avatar Feb 18 '25 11:02 ekes

I'd lean towards using localgov_page for the reasons @ekes outlines.

Having a whole new content type for just one page seems like an anti-pattern in terms of complexity and overhead.

At Greenwich we created a specific landing page content type for landings pages and home page, but the localgov_page is more flexible.

If a council is doing no front-end theming, the localgov_page probably gives the most flexibility.

If a council is doning frotnt-end themeing, they can always override the homepage template as desired.

finnlewis avatar Feb 18 '25 11:02 finnlewis

Adding comments from duplicate issue https://github.com/localgovdrupal/localgov/issues/799

@willguv said

Having just helped with the new Dumfries homepage, I saw how relying on subsite overview is broken in a few ways:

homepages often have custom content and styling which have to be targeted to a specific subsite overview page, and won't be seen until that page is designated as the homepage it's often not easy to see work in progress (due to complexities around domains, nervousness around publishing the page etc) having to use a subsite overview and not a dedicated homepage content type is confusing to council digital teams Any changes would be available to new councils only.

Let's discuss the effort in making this work.

@markconroy said

I was doing some training with a council last week and one of their big questions was "how do we create a home page/splash page/landing page?"

They hadn't realised that we use "Subsite" to create homepages and landing pages.

@willguv What do you envisage would be different on the homepage content type to the subsite overview page? I think we should probably have a new content type, but I'm not fully sure if we need different fields for it.

Hero Page Builder They seem like the two obvious fields. Maybe it's as simple as that?

@stephen-cox said

We do have the LocalGov Page content type, which is shipped with Microsites but no LGD.

They may not be the perfect solution but much better than Subsite pages.

@rupertj said

I think having a homepage type would make a lot of sense. We added one to H&F. An additional reason to add one is search - you probably don't want to have your homepage come up in your search, while most other pages you might consider using as the homepage should. Using a dedicated type for the homepage makes this dead easy.

Also if we do add one, we could use it to create a nicer onboarding experience than the current HomeWelcomeBlock in the profile that says "You have just installed a LocalGov Drupal site" (and get rid of that block, as part of gutting the profile so it can all be recipes).

We could create a default homepage to replace the block with more comprehensive instructions, better introductory content, etc.

willguv avatar Mar 25 '25 08:03 willguv

@rupertj how is your homepage type different from localgov_page please?

@finnlewis @ekes could we add localgov_page to LGD and make it clear somehow it's designed to be used as a homepage?

willguv avatar Mar 25 '25 08:03 willguv

@willguv They're actually pretty similar, it turns out. Both of them have a banner field and a separate field for main content which hold paragraphs.

Localgov page has an additional field to store a summary, and a field to selectively hide it.

There's a good chance we just overlooked localgov_page and built our own type.

rupertj avatar Mar 25 '25 09:03 rupertj

I would prefer to keep localgov_page for pages like accessibility statement, cookies policy, and other basic pages that don't fit within the services hierarchy and have a dedicated page type for homepage (so everyone knows exactly what the page type does).

markconroy avatar Mar 25 '25 16:03 markconroy