Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

This module allows you to create menu-driven subsites within your Drupal site. It uses Drupal's menu system to define the structure of subsites, display navigation, and manage page hierarchies. You can also apply custom styling to subsites based on theme choices.

This module let you create menu-driven subsites in your LGD site. The menu defines the structure of the subsite, and also lets you use Drupal's standard menu blocks and tools to display the subsite's navigation and manage the hierarchy of the pages within it.

To use it:

  • Install and enable the module.
  • Add a subsite overview page. Choose a theme, and choose to create a menu link in the subsites menu. Save the page.
  • When you view the page, you can inspect the markup, and should see classes 'subsite-extra' and 'subsite-extra--color-x' (where x is the theme you chose) applied to the body tag. You can use these classes to style the subsite in different colour schemes.
  • Create another page. This time, choose to create a menu link and select the page you just created under "Parent link".
  • Again, you can inspect the markup of this new page, and should see classes 'subsite-extra' and 'subsite-extra--color-x' on the body tag, picked up from the parent.

Set up the menus

  • To set up the menus, place a new menu block. Choose the 'subsites' menu when creating the block.
  • Under "Menu levels" set Initial visibility level to 2, and no of levels to display to 1.
  • This module will add a variable into the menu template for the subsite homepage when you're in a subsite. (EG, this is the link styled like a house on https://www.lbhf.gov.uk/celebrating-hf). To make use of this, add this to your menu template:
        {% if subsite_homepage_link %}
          <div class="subsite--menu__title">
            {{ subsite_homepage_link }}
          </div>
       {% endif %}

Advanced usage:

By default, this module will work with the content types and fields provided by localgov_subsites. It doesn't have to though. You can use any node type you like as a subsite homepage, and any field you like to determine the colour scheme. One current limitation is that the code currently assumes that the theme field is of a type that has 'value' as a key. EG a string list field.

There's currently no UI to set these options, but you can change them by editing the localgov_subsites_extras.settings config in your site's exported config, then importing, or overriding it in settings.php like this:

$config['localgov_subsites_extras.settings'] = [
'subsite_types' => ['localgov_subsites_overview'],
'theme_field' => 'localgov_subsites_theme',
];

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
6
Tracked since
Nov 2025
Latest release
2 months ago
Releases (12 mo)
6 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
1.1.0-alpha3 Pre-release 10–11 Jun 4, 2026
1.1.0-alpha2 Pre-release 10–11 May 6, 2026
1.x-dev Dev 10–11 Apr 16, 2026
1.1.0-alpha1 Pre-release 10–11 Dec 1, 2025
1.0.0-alpha5 Pre-release 10–11 Nov 20, 2025
1.0.0-alpha4 Pre-release 10–11 Nov 20, 2025