This forum is for assistance with theme development.

How to add javascript in head tag?

Hello, i am new in Drupal. I need to add a script in js to the <head></head> tag. Where is this part of the body in the drupal template.

I am working with drupal 9 and 10. Thanks you help.

Olivero, customize grid layout

Olivero's sidebar (.sidebar-grid .region--sidebar) is a bit too small, especially on the larger screens, to insert graphically interesting contextual blocks.
How to enlarge it safely?
I tried overriding in a custom-grid.css the grid-columns of '.sidebar-grid > .site-main, .sidebar-grid .region--sidebar' and apparently it works.
I'll probably have to increase the max-width of page-wrapper a little as well.

Then in cascade I will possibly have to make adjustments for the various @media.

Twig file don't get the value of Texonomy

Friends,

I created a view with four fields. Two of them are text fields and other two get the value from texonomy. I created four "Twig" files for eatch field.

1. Text field

views-view-field--dictionary--page-1--title.html.twig

Code used for output

{{row.content['#row']._entity.title.value}}

2. Text field

views-view-field--kosh--page-1--field_meaning.html.twig

Code used for output

{{row.content['#row']._entity.field_meaning.value}}

3. Value from Taxonomy

views-view-field--kosh--page-1--grammar.html.twig

Attacking /admin/flush

Hi,

We have a government client for whom we have built a Drupal website. Their IT Team has responded back with the following.

"When they are scanning they are attacking /admin/flush as a credentialed scan its doing a brute force as admin to this resource which is constantly doing a cache rebuild in drupal. As such the site never responds back by the time the second “attempt” happens and it falls over because constantly clearing the drupal cache never happens.

"Demonstrate block regions" and new regions

I did read the document at the URL below (Adding Regions to a Theme).

https://www.drupal.org/docs/theming-drupal/adding-regions-to-a-theme

The regions part of my .info.yml follows.

A theme from scratch importing Bootstrap 5: how bad is the idea?

I already made something like what mentioned in the subject, though using Bootstrap 4.

The idea was using the bare minimum, occasionally stealing some html.twig file from a Bootstrap-centered  theme.

Pages

Subscribe with RSS Subscribe to RSS - Theme development