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

Comments

richardgaunt created an issue. See original summary.

richardgaunt’s picture

Issue summary: View changes
richardgaunt’s picture

Title: Use less specific templates » Use less specific node templates for entity view mode
fionamorrison23’s picture

Version: 1.9.0 » 1.x-dev
alex.skrypnyk’s picture

This is a great idea!

It also would be great to document how to override these for more specific content types.

fionamorrison23’s picture

Assigned: Unassigned » fionamorrison23
fionamorrison23’s picture

fionamorrison23’s picture

richardgaunt’s picture

Status: Active » Reviewed & tested by the community
richardgaunt’s picture

Version: 1.x-dev » 1.13.0
Assigned: fionamorrison23 » Unassigned
Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.