Keep the page theme suggestions

Created on 15 April 2024, 12 months ago

Problem/Motivation

I was using a custom twig template for the user login page, but it disappeared as soon as this module was enabled. The template suggestions was "page--user.html.twig" and "page--user--login.html.twig".

Steps to reproduce

Add a twig template "page--user.html.twig" into your current theme, enable the module, the file will be not take in charge because the theme suggestion doesn't exist.

Proposed resolution

Use the hook_theme_suggestions_alter() to keep this two suggestions and get it works. Maybe this hook could be added in a custom local theme or module, but I thought it would be a good thing to get this default behavior directly in this module.

💬 Support request
Status

Needs review

Version

2.0

Component

Code

Created by

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

Comments & Activities

Production build 0.71.5 2024