Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
Running the default gulp task (or any other that creates the styleguides) is throwing several errors regarding the .twig files. Moreover it seems that in every include statement, eg.:
{% include "@THEME_NAME/components/messages/messages-icon-error.svg" %}
@THEME_NAME is set to /D which is incorrect and is in turn trying to access a file that does not exist.
This is my first Drupal 8 site. I have a content type with a select list field. In my twig template I can print out the values. But I would like the keys too.
field_colors:
red_oak|Red Oak
white_oak|White Oak
.....
I can get the values easy...
{{ content.field_colors }}
But what I want to do in my twig template requires access to that key..
I am new to Drupal and I love it very much. I am learning it on my own but I am stuck on a problem right now.
I created a custom block that display a title and a list of links. So the only fields in that blocks are of type links. It's a block for my footer region. So when the user clicks, it opens a new website in a new tab.
I want to alter the html output just for this block type, so I took out this theme suggestion:
field--block-content--field-links--footer-links.html.twig