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

Tuesday, April 3, 2018

Detect MacBook by JavaScript

var isMac = navigator.platform.toUpperCase().indexOf('MAC')>=0;
 
  if ( isMac === true ) {
      $('css selector').css("line-height","150px");
  }

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...