localgovdrupal/localgov_moderngov

Drupal module for ModernGov template page generation.

Installs: 13 445

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 7

Forks: 0

Open Issues: 6

Type:drupal-module

pkg:composer/localgovdrupal/localgov_moderngov

1.0.0-beta2 2024-05-14 11:47 UTC

README

Drupal module for Modern.Gov template page generation.

Modern.Gov, when provided with a template page URL, fetches that template page at a regular interval. It then uses the template page to generate your instance of the Modern.Gov site.

Features

This module serves the Modern.Gov template page from the /moderngov-template path. If you need a different path then please add a URL alias for /moderngov-template.

The template page has the the following ModernGov tokens embedded within:

  • {pagetitle} instead of the actual Drupal page title.
  • {breadcrumb} instead of the Drupal breadcrumb.
  • {content} instead of the page content.
  • {sidenav} instead of the second sidebar.

Both links and asset URLs in this Modern.Gov template page are rendered as absolute URLs which is a requirement for Modern.Gov template pages.

Page template

Most sites will need a customized Modern.Gov page template for their themes. The page template provided with this module is meant to serve as an example of how Modern.Gov tokens could be placed in a page template.

Good to know

  • ModernGov test URL. This sits behind HTTP authentication.
  • Any relative URL embedded within inline Javascript or script tags will not be converted to absolute URLs.
  • BigPipe functionality has been turned off. This is because this module is concerned about serving templates for anonymous users. This can be reviewed later if necessary.

Related templates

  • Empty page template at /moderngov-template?nocontent: Instead of ModernGov tokens, this template comes with an empty main HTML tag.
  • Header template at /moderngov-template?header: Everything inside the header HTML tag. Comes with asset links that preceed the header tag.
  • Footer template at /moderngov-template?footer: Everything inside the footer HTML tag. Joined by asset links that follow the footer tag.
  • /moderngov-template?noaggregation: This template serves CSS and Javasript files without aggregation. The noaggregation HTTP query parameter can be used with any of the other parameters mentioned above.

Maintainers

This project is currently maintained by: