Tuesday, April 24, 2018

Fetch image url in twig views block template in Drupal 8

-- Use pro_img variable anywhere in your current twig file --
=============================================
{% for row in rows %}
{% set pro_img = file_url(row['content']['#row']._entity.field_profile_picture.entity.fileuri) %}
{% endfor %}
-- Happy Coding

No comments:

Post a Comment

Change priority of dual boot OS

Change priority of dual boot OS  (Windows and Linux): Go to your Linux OS, install Grub customizer. Then change priority by up and down arro...