This forum is for assistance with theme development.

Url view in "Global: Unfiltered text"

Hi. I'm trying to add a URL to a view like I do in TWIG but in a "Global: Unfiltered text" field within a view (like this : https://pasteboard.co/JbofAQU.png).

But this does not seem functional. Any idea what I am doing wrong? 

Thanks.

How to get alt tag in media.html.twig?

In media.html.twig I can use the following variables: 

  • name: Name of the media
  • content: Media content.

Then if I select the format option "URL to image" in "/admin/structure/media/manage/vector_illustration/display/content" then I get the image url just with:

{{ content.field_media_image }}

But how I get the alt tag of this image? I tried 

{{ content.field_media_image.alt }}

or

How To Breadcrumb Title Change

Hello guys, I'm new to Drupal. I am trying to make a site. As you can see in the picture, I can not change the page title. The pages I just created are okay, but this page is a content type. And this page shows the name of the content type. How can I change this title.

https://ibb.co/qBWpw4H

What does #-sign in key values mean?

When I put 

{{ dump(content.field_graphics|keys) }}

in a node template I get this entries:

I want to migrate my WordPress to Drupal

Hi,

I'm the owner of https://www.appsmedian.com and I want to migrate my site to Drupal. I'm interested in create a template that it is very similar to the current template. Somebody know if there is easy way to convert a WordPress template to Drupal template?

Thanks in advance

Printing views field raw value from twig template

I have a view that pulls in fields from a content type. I am trying to print only the raw value of one of the fields. Since there doesn't appear to be any clear documentation on how to do this anywhere, I am forced to ask here. 

I have a views-view-field--field-name.html.twig template file. I have tried multiple things to get the field to render, and aside from using {{ output -}} nothing works. 

Things I have tried. 

{{ field.field_name.value }}

{{ field.field_name.value|raw }}

{{ field.field_name.content }}

{{ field.field_name.content|raw }}

Pages

Subscribe with RSS Subscribe to RSS - Theme development