Use less specific templates

Created on 6 March 2025, about 1 month ago

Problem/Motivation

1. I want a new content type
2. I clone the page content type to `news` (same configuration now)
3. I update automated list to allow filtering by new content type
4. I go to page: - default node template is showing for each result with new content type

Proposed resolution

We use content type specific template names:

  • node--civictheme_page-civictheme-navigation-card.html.twig
  • node--civictheme_event--civictheme-navigation-card.html.twig

But we could do:
node--civictheme-navigation-card.html.twig

And so every new content type we create will work with this template.

Remaining tasks

1. Create new node templates for our node view modes use the `node--civictheme_page-*` as the base template:

  • node--civictheme-navigation-card.html.twig
  • node--civictheme-promo-card.html.twig
  • node--civictheme-slider-slide.html.twig
Feature request
Status

Active

Version

1.9

Component

Code

Created by

🇦🇺Australia RichardGaunt Melbourne

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

Comments & Activities

Production build 0.71.5 2024