This forum is for assistance with theme development.

How to pass attribute/variable to child template

While trying to remove unneccessary <div>s from twig templates I stumbled upon a problem with image alignment of inline media items.

Steps to reproduce:

* Drupal 10, starterkit theme with stable9 as parent theme
* create content with CKEditor5
* insert image via media toolbar button (from core media module)
* align media/image centered
* save page

[Solved] How to choose/create a clean base theme for Drupal 10 (starterkit, stable9, none/system)

I'm new to Drupal and I spend the last weeks with learning Twig, CKEditor5 and module/theme development. My goal is to have a clean base theme:

* zero JavaScript files from core or parent theme
* all unneccessary <div>s removed
* minimal or no changing dependencies (twig templates and CSS)

This base theme should than become either the parent theme for my actual themes or serve as a base/starter git repository.

subtheme.theme file not recognised

I am on Drupal 9

I am using W3css as by base theme (drupal8_w3css_theme).
My theme's name is storm
 

All my templates and css files are recognised and they do change the layout and look and feel as I want.
However here is the problem.

I want add storm_form_node_form_alter hook in my storm.theme file
I added it however there is no effect.

What is the advantage of compiling bootstrap? And how to circumvent it?

Hello,

there are a couple of base themes etc. where I have to use composer to install the theme and then use NPM to install / compile it?
(e.g. Radix 5.x)

What is the advantage of not using the old methods of simply having theme files and css files and things work?

Is it possible to avoid using NPM?

And do I have to install NPM on my production server as well or is it just for the dev environment?

I didn't do much front end work within the last 2 decades ;)

Thanks,
Transmitter

Displaying parent field value in field.html.twig template from nested paragraphs

See attached please. Using field.html.twig and paragraph.html.twig, Paragraphs 8.x-1.16 Stable release and Drupal 9.5.10

field.html.twig:

Unable to disable cache (Resolved)

Hi all, I am developing a custom theme and I am trying to disable the cache so that I don't have to constantly flush the cache every time I change the CSS.

I referred to this document and attempted the first solution titled "The Easy Way" but the settings only seem to partially work.

I went to Admin -> Configuration -> Development -> Development Settings and I Toggled:

Pages

Subscribe with RSS Subscribe to RSS - Theme development