How to enable theme suggestions in Drupal 8

OK, I’m not a programmer, never was or said I am. But I can play around and act like one. It’s harder to comprehend things that are obvious for dedicated coders, but at the end, what matters is the final result. 

Cut the long story short.

I wanted to modify a twig template to reformat the output of a view built with Paragraphs fields. But I didn’t have a clue on where and how to do start doing that. I found all sorts of pieces of code to put into theme.php, but nobody said it’s a Drupal 8 feature to debug twig templates.

You just need to rename default.services.yml (in sites/default) into services.yml and set debug: true. Simple as that. Save, drush cr and continue learning!

Oh, one more thing. If you have such tool that optimizes the output of your HTML, just remember to disable HTML comments removal.

I have pagespeed module compiled with nginx and I had to comment out a line in pagespeed.conf to enable comment in page source.

That’s all.

LĂSAȚI UN MESAJ

Vă rugăm să introduceți comentariul dvs.!
Introduceți aici numele dvs.
Captcha verification failed!
Scorul utilizatorului captcha a eșuat. va rog sa ne contactati!

Acest site folosește Akismet pentru a reduce spamul. Află cum sunt procesate datele comentariilor tale.

- Advertisement -spot_img
Noutăți

Articole similare

- Advertisement -spot_img