Published: November 8, 2023
Proposed new Theme Settings for LocalGov Drupal unpublished Content
We added Drupal's default pink background to LocalGov Drupal's unpublished pages recently. It didn't go down as well as we might have hoped!
Drupal by default sets a pink background on unpublished nodes. We added this as a feature to LocalGov Drupal recently to distinguish between published and unpublished content.
Editors were not very impressed with this because - especially on new websites - there's lots of whole sections that are unpublished. And when trying to preview a full section to stakeholders and nearly every page has a pink background, including all the items in entity reference fields and other listings, the site starts to not look like what was designed.
To get around this, I've proposed 2 site settings that can be enabled via the theme settings page if your theme uses LocalGov Base as its base theme.
- Turn off the pink backgrounds (handy if you just want to turn them off temporarily while demoing your content and then back on again once the demo is over)
- Add the word "Draft" to the title of any node that is unpublished (handy if the pink background is turned off more permanently).
Here's a short video to show it all working:
The code for this can been seen in this pull request on GitHub.