Subtheme: Extend the Theme and preprocess functions

Created on 14 November 2023, 10 months ago

Problem/Motivation

In the past, even if not now desired, we've had some useful Drupal body classes added via the theme, like:

  • page-variant--homepage
  • path-frontpage
  • page-node-type-page
  • Others like whether the user is logged in and if the admin tool bar is extended in various ways.

Would it be worth adding those back in? It may just be that when we create a subtheme, these include files are not being copied across or extended.

Steps to reproduce

Run a fresh install of the latest Sector and then create a new subtheme. See if the html and body classes exist.

Proposed resolution

Implement / Extend the Theme and preprocess functions for html and body.
see https://git.drupalcode.org/project/sector_theme/-/blob/1.0.x/includes/ht...

Then update Documentation for themers on how to extend the subtheme.

πŸ“Œ Task
Status

Closed: duplicate

Version

10.0

Component

Code

Created by

πŸ‡ΏπŸ‡¦South Africa stewest Cape Town

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

Comments & Activities

Production build 0.71.5 2024