This forum is for assistance with theme development.

Content printing in twig (9.0.7)

Hello all, I'm developing a node--testcontent.html.twig

I want to show the content of the body with its format.

I understood that I need to use

{{ content.body }} but this does not print anything.

If I code {{ content }} I get everything nicely formatted. If I tried to list all in with a for cycle and I get only the key "_field_layout".

Admin Menustrip Blocks Theme Header

I'm experiencing some weirdness when viewing pages from admin. The admin menustrip, which can be viewed either horizontally or vertical blocks display of my theme's header. The theme display fine when logged out. Is there an option to prevent the menustrip  blocking the top portion of my themes?

changing <a> color using Settings --> Advanced Options --> Inline CSS

We have a custom theme that is being used by over 100 sub-sites for one University.  ONE of the sub-sites would love to have me change the color of their linked content from red to blue.  I can't change this in the actual theme for them because it will affect all the sites. I tried adding a simple a {color:blue;} to the inline CSS box in Advanced Options but apparently its not as simple as that.  They have linked text in <p>, <h2>, <h3>, <h4>, <h5> and <h6>.  I would love some advice on what step to take to get this change to happen.

View keeps changing theme

I have a view

It used to be called 'page_1'
It is now called 'c_page'

I have created a template called 

'node--view--branch-list--c-page.html' to render this view

This worked perfectly for many weeks. Until now

Sometimes when i load a page created by this view it is very very glitched.
And sometimes when i load a page created by this view it is fine.

After much investigating i discovered that this is happening because the template suggestions are different on each page load

sometimes the first two template suggestions are

How to Get the Use Logo Value from Theme Settings

Greetings,

  I have created my own theme in drupal 9 and am trying to get the value of a theme setting called:

'Use the logo supplied by the theme'

This is a standard drupal setting which is on my theme configuration page.  I want to use the setting to alter my theme.  I've seen how to create my own user setting and get the value with

$setting = theme_get_setting('my_setting');

but in this case I'm trying to get the value from a for the CMS has created.

I've tried this

$logo = theme_get_setting('default_logo');

The libraries of my customized theme cannot be loaded - Drupal 8

I'm trying to translate my Drupal 7 theme to a Drupal 8 theme.

I followed the instructions to add my CSS and Javascript files by creating the *.libraries.yml.

This is my babol_dp8.libraries.yml file:

Pages

Subscribe with RSS Subscribe to RSS - Theme development