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

Workflow of WordPress project in a team with Git

1. We should not push any Wordpress core folders or files to github. 2. Only push custom theme and custom plugin into github. 3. So, in this...