Topic page implementation

Created on 12 November 2024, about 1 month ago

Problem/Motivation

It would be nice if Drupal WxT supported the Topic page template out-of-the-box.

Topic page:
Canada.ca Design: https://design.canada.ca/mandatory-templates/topic.html
wet-boew: https://wet-boew.github.io/GCWeb/templates/topic/topic-doc-en.html
Example page: https://wet-boew.github.io/GCWeb/templates/topic/topic-en.html
In the wild: https://www.canada.ca/en/revenue-agency/corporate/careers-cra.html

The template for Topic pages includes the Contributors design pattern.

Contributors:
Canada.ca Design: https://design.canada.ca/common-design-patterns/contributors.html

Proposed resolution

Add a Topic content type with associated fields. The Featured field is built with a paragraph to allow for changes to the Topic patter, or for this who want to make adjustments and add more than one Featured item.

Add a content block type called Social media. The block has a paragraph for each link, which includes a Link field (with link text) and a type, that allows the user to select the social media type (Facebook, Instagram, etc...). The type values come from GCWeb CSS that defines the social media types with associated icons and styling.

Added the related ticket, since this was implementing the Byline field (Contributors). I merged these changes into this MR in order to stay consistent with implementation. This means Departments are added as Terms in a new vocab, which allows the user to enter a Link for the Department/Organization. Users can then select multiple Departments on the Page and Topic content types. This ensures consistency across displays. Some CSS was ported from GCWeb to facilitate the Byline.

Remaining tasks

Create pull requests after testing changes locally.

User interface changes

The new Byline field is now available on the existing Page content type. It is added in the sidebar, labeled Byline.

Feature request
Status

Active

Version

5.3

Component

Code

Created by

🇨🇦Canada smulvih2 Canada 🍁

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024