Add ability to override twig template in theme

Created on 28 February 2024, 12 months ago
Updated 31 May 2024, 9 months ago

Problem/Motivation

I am wanting to override the template so that I can add the hide-tabs parameter to the url output.

The required Media Remote module documentation indicates how override the output of a media remote types:

The easiest option is to copy the corresponding twig template into your theme, and customize it there.

Steps to reproduce

When I try to accomplish this by copying the media-tableau.html.twig template into the themes template folder, it doesn't work. The copied and overridden template in the theme templates folder isn't even recognized.

I am able to override the output if the code of the template in the module by testing with:

<div class="tableauViz-wrapper">
  <div class="tableauViz-container">
    <tableau-viz class="tableauViz"
      src="{{ url }}"
      toolbar="hidden" 
      hide-tabs >
    </tableau-viz>
  </div>
</div>

Proposed resolution

Wondering if the issue might be that in the .module file of the Media Remote module, there is code for a hook theme override and a listing of all the different remote services. Tableau is not in that list, of course, and maybe that is why the media-tableau.html.twig is not able to follow the same override capability.
Just a hunch, but wondering if that capability to override the template could be added to the Media Tableau module.

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Fixed

Version

2.0

Component

Code

Created by

🇺🇸United States daniel-san

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024