Document that views preview uses the admin theme

Created on 17 January 2023, over 2 years ago
Updated 20 April 2023, about 2 years ago

Problem/Motivation

I've pulled views-view-rss.html.twig out of /core/modules/views/templates/ and placed it in /drupal/web/themes/custom/mytheme/templates/views/ and flushed caches (many times) but still my views previews says it's using the core version of the template

<!-- THEME DEBUG -->
<!-- THEME HOOK: 'views_view_rss' -->
<!-- BEGIN OUTPUT from 'core/modules/views/templates/views-view-rss.html.twig' -->

Tested this on two different Drupal installs and same result.

Steps to reproduce

Create an RSS view in Drupal 9.5. Grab the views-view-rss.html.twig template file out of core and place it in a child theme. Rebuild cache. Check view preview with debug info on in services.yml to see what template is being used for output.
Expect to see your template, but don't

Proposed resolution

Document in the Views UI that the preview is done in the admin theme

📌 Task
Status

Active

Version

9.5

Component
Theme 

Last updated 4 days ago

Created by

🇨🇦Canada OMD

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Status changed to Closed: works as designed over 2 years ago
  • Status changed to Active over 2 years ago
  • 🇨🇦Canada OMD

    You know, what would be more useful than a notification, is having the preview use the active theme instead of the admin theme, or maybe a setting that lets the user chose which theme they'd like to see in the preview - although I can't think of a use case for wanting the preview to be in the admin theme, since 100% of my views are created for front end pages.

  • 🇺🇸United States pcate

    You know, what would be more useful than a notification, is having the preview use the active theme instead of the admin theme, or maybe a setting that lets the user chose which theme they'd like to see in the preview

    I agree this would be a great feature since currently the preview using the Admin theme does not show changed made in theme twig templates and of course non-admin theme styling.

    I think for this to work though the preview would have to render inside a iframe.

Production build 0.71.5 2024