This forum is for assistance with theme development.

Custom menu twig template get id by alias. Possible?

I am new to Drupal 8 and cannot seem to be able to figure this out.

I have a custom menu--main.html.twig template where I need to get node ID from an alias. I am able to extract item.url in a macro and then would like to use a twig tweak function to load a field from another node.

Can anyone help me to solve this problem?

I'm a beginner in Drupal and I'm helping to administer a site djanemag.com, but the problem is the look of the main page that is without the graphics and all messed up according to the print. However, the other pages are working perfectly. 

My Olivero subtheme broke when activating Aggregate JavaScript files

I created an Olivero subtheme. It's working fine... but my Olivero subtheme broke when activating Aggregate JavaScript files: dropdown menus are no longer working, and the search is unusable.

I'm using Drupal core 9.3.9

In console:

Uncaught TypeError: Cannot read properties of null (reading 'addEventListener')

 at js_N6YcbK7swTTO49Zu5WT0LHu1uhUK8RuVmnXXesZEYMA.js:5516:73

at js_N6YcbK7swTTO49Zu5WT0LHu1uhUK8RuVmnXXesZEYMA.js:5521:3

How to add an html tag to a theme

I am using the zurb_foundation theme in Drupal 9.3.x. I want to add a new html tag that does scrolled text using jscrollpane.

I made a mystyle.css file in the css folder that contains

pscroll {
  margin-bottom: 1rem;
  font-size: inherit;
  height: 200px;
  overflow: auto;
  text-rendering: optimizeLegibility; }
  }

And then added mystyle.css to zurb_foundation.libraries

Where to hire a Drupal theme developer for a website?

Anyone know if there is a trustable platform to hire a Drupal theme developer for a website? Thanks.

Complete crash after modifying services.yml

i'm on localhost, and i don't have drush installed

I've configured /sites/default/services.yml like this for writing my theme : 

    twig.config:
      debug: true
      auto_reload: true
      cache: false

When done, i've reset the values /sites/default/services.yml like that :

    twig.config:
      debug: false
      auto_reload: null
      cache: true

Since then every pages responds :

"The website encountered an unexpected error. Please try again later."

Pages

Subscribe with RSS Subscribe to RSS - Theme development