Posts with tag: #Drupal

Javascript Promise to Rescue

05 February 2019 — Written by Mitesh Patel
#Drupal#javascript#promise#geolocation

Recently I came across a situation in Drupal, where I'm asking user for location permission, and then I display some output based on their lat/long (displaying formatted address using google map api). so, When user visits the site next time, the result could be displayed based on location.

Read more →

Drupal 8: Optional dependency injection in Plugin

04 November 2018 — Written by Mitesh Patel
#Drupal 8#Drupal#Dependency injection#Drupal plugin#Drupal services

With Drupal 8 adoption to symfony services, we have benefited with dependency injection, initiating required objects of injected services. In Drupal 8, We also have other areas like plugins, controllers where we extensively use dependency injection with the help of container.

Read more →

Drupal: Trigger ajax request in js manually

03 October 2018 — Written by Mitesh Patel
#Drupal 8#Drupal#ajax

In Drupal, You can trigger ajax call for any html element and anchor links with a specific implementation explained...

Read more →

YAML: Share values using alias.

23 July 2018 — Written by Mitesh Patel
#Drupal 8#Drupal#yaml

In YML often we use common values again and again for different purpose. For example, imagine the variation for image_styles for an e-commerce site and most places we use the same style for instance. There's a way to avoid duplication in yml.

Read more →

Translate views strings programmatically in Drupal 8

25 June 2018 — Written by Mitesh Patel
#Drupal 8#Drupal#Multilingual#Configuration translation

In Drupal 8 views translation can be added from back end using views ui. You just need to enable the 'Configuration Translation' module.

Read more →
Copyright © 2022 Mitesh Patel. Built with Gatsby