This forum is for assistance with theme development.

Attaching a library to a twig template that is overriding a module template

I'm trying to attach a library to a twig template that is overriding a module template using the following function:

{{ attach_library('mytheme/my-library') }}

The attach isn't happening though. If I add the same attach_library function to my page.html.twig file, it attaches without issue, so I know my library is setup properly. I've also confirmed that my template override is working properly (it's changing the output of the module).

Is there something special I need to do to attach a library to a template file that is overriding a module template?

ThemeKey module

Hello,

I have defined a rule path path = node / 110 in the ThemeKey module, I have cleared the cache but it does not work.

At the same time I get the notice "garland is configured as administration theme at admin / appearance. This setting is more powerful than a corresponding ThemeKey rule.
As configured at admin / appearance, adding or editing a node will use the administration theme, garland.
Missatge d'estat "

What could be the cause?

Thanks

How to adapt the appearance of Modal Flag to Bootstrap 4 ?

My website is with Drupal 8 and the Barrio theme (Bootstrap 4).

I have a problem with the Flag module and the Modal windows.

This is what a Modal window should look like :

https://i.stack.imgur.com/VPQ77.png

Here is what a Modal window looks like with the Flag module (the same problem appears on all contrib modules and core modals) :

https://i.stack.imgur.com/GNCzK.png

Call admin made custom form in twig

I create 3 different custom forms by Administration > Structure > Contact forms area and need to call them in specific template but most of tutorials mentioned to create form programmatically by creating module or modify theme.inc. Is there any way to create a form in Admin panel then call it in twig file like {{ form.<custom_form_machine_name> }} ?

Problems with Image Field Caption module

Hi!

I have installed the Field Caption module, and enabled it. I follow the instruction from

https://git.drupalcode.org/project/image_field_caption/blob/HEAD/README.txt

I choose the field format "Image with caption" on the "Manage display" tab for an image field, but I cannot see it when I edit the content type with the image field...What could I am doing wrong?

Thanks in advance!

Problem with placing a block in a region

Good day!

I'm only start to learn Drupal and i have a problem with configuring blocks. I want to hide some block on some pages but when I open page with block configuration there isn't tabs Content types and Pages in visibility settings. Can you tell me why? Drupal version 8.9.3

Pages

Subscribe with RSS Subscribe to RSS - Theme development