This forum is for assistance with theme development.

How to get current region or current block of node in hook_theme_suggestions_node()

I need to get current region or current block where is node in node hook

hook_theme_suggestions_node(array $variables)
{
  $region_of_node = //I don't know how to get it
  $block_of_node = //I don't know how to get it
  $suggestions[] = 'node__'.$region_of_node.'__'.$block_of_node;    
}

I don't need both just one, region or block. Please help

custom theme css and js not loading on Drupal 9.3.0

Hello everybody, I'm trying to upgrade the old "Professional" theme developed by Devsaran for Drupal 7.x to make it work into Drupal 9.3.0, in Windows 10 Pro 64 with Xampp Apache 2.4.48, php 8.0.7, so I created just an empty standard test site with Bartik theme as default, I followed all the instructions given in many tutorials to create the proper files, .theme, .info.yml, .libraries.yml and the .html.twig files, but I didn't have any success, I checked the format of the files, the paths of css ans js files and I respected all of the standards given in many forums.

TypeError: Drupal\Core\File\FileUrlGenerator::generateString():

Hello

PHP 8

APACHE2

I have this message when I want to access a page to edit :

Bootstrap 4/5 - Barrio SASS Starter Kit npm install fails

I'm new to Drupal and am trying to do a tutorial I found on skillshare.com (Make Drupal 8 twig theme in 1.5 h + useful tips). I've installed Bootstrap Barrio and now am trying to install the sub-theme, Bootstrap 4/5 - Barrio SASS Starter Kit, as instructed on https://www.drupal.org/project/bootstrap_sass. 

On the theme´s folder:

All created content is not displaying content only title

I am very new to Drupal and i am building a custom theme. When I check my localhost from a logged out user i cant seem to see any pages. the node path is currect and i only get the title displayed. everything else is gone. I dont know what files i should share here or how to debug this issue.

I am using Paragraphs to add content and planning to use views later on for other content type.

Pages

Subscribe with RSS Subscribe to RSS - Theme development