This forum is for assistance with theme development.

Commerce 2.x cart icon

Hello, I'm looking for a easy way to show on my template a cart icon only if cart has some elements ; I've tried with views, but

had problems to identify the cart associated to the current (normally anonymous) user.

Does that easy way exists ? Or can anyone point me to the right direction / documentation ? I've searched on Commerce 2.x docs,

but didn't find anything on this point (I don't want to show the cart, only show an icon when the cart exists and has more than 0 elements)

Thank you

Marco

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

Pages

Subscribe with RSS Subscribe to RSS - Theme development