This forum is for assistance with theme development.

Sub-theme file path names when viewing the source?

After creating a sub-theme, and viewing the page source, are file paths still inherited from the parent, or do they use the name of your sub-theme?

For example, if the parent theme is named "silly-name", and you created a sub-theme named "better-name", are all the links all based on the sub-theme (A) or would they be a mix of the sub and parent (B)?

Example A (custom)

../themes/contrib/better-name/

Example B (mixed)

../themes/contrib/better-name/ and ../themes/contrib/silly-name/

[solved] image url token in twig?

Hi.

Not sure if it is the correct section here… if not, please move or advise…

I want to have a video poster in the file > video field. I have not yet been able to find a practicable solution. So i thought i can do this by simply adding the url for the poster image inside the <video> tag. But i don't know how to get the url value as a token working in twig. I am also not sure if the image would be from the actual node. Maybe this apporach is not even working.

Suddenly variables in page-html.html.twig are empty???

This is on a Drupal 10 site, and I guess that a Drupal or module update went wrong?

Suddenly the variables in page-html.html.twig are empty for taxonomy pages.

Symptom: the taxonomy page title is not displayed.

This happens with an existing starterkit theme, but also with a brand new one created with

php php core/scripts/drupal generate-theme --name TestVarSetting --path themes/custom/ -n TestVarSetting

Remove "No front page content" and replace with a template file.

What I am trying to do is if the text "No front page content has been created yet. Follow the User Guide to start building your site." is on the front page replace it with my own template, that displays the same text but gives more information on how to create content as well as resources to get help. I am well aware that creating content and promoting it to the front page or creating a page--front.html.twig file will remove this text but that defeats the purpose.

Drupal 10 - bootstrap 5 Sub-theme - Inheriting Block Placement

I'ld like to create a dedicated sub-theme that looks like exactly like its parent, layout included. So I followed the blocks and regions inheritence instructions:

can't find theme directory

(I posted a version of this in another forum but it keeps getting flagged as spam.)

Someone assisted me in installing Drupal with Docker on my Mac. (I am new to Drupal and it has been years since I last coded.) The site works fine. I would like to set up a custom theme, but when I open VS Code in the installation directory, there are only the following files: .env, .gitignore, docker-compose.yaml. I don't see a theme directory or anything that I expected. The docker-compose.yaml file has this in it:

volumes:

Pages

Subscribe with RSS Subscribe to RSS - Theme development