Drupal

Step-by-Step Guide to Creating a Controller in Drupal 8/9/10

Create a custom module: If you haven't already done so, create a custom module in Drupal 10. You can refer to the previous question for a step-by-step guide on creating a custom module. Define the routing file: In the module folder, create a new file with the extension ".routing.yml". This file defines your module's page's URL path...

by Rajveer Singh
Tag: Drupal
28-Apr-2023

Drupal

Drupal Data Migration with Migrate API

The Migrate API provides services for migrating data from a source system to Drupal 9. Migration is an Extract, Transform, Load (ETL) process. In the Drupal Migrate API the : Extract phase is called the source Transform phase is called the process Load phase is called the destination It's critical to realize that...

by Amrit Pal Singh
Tag: Drupal
29-Mar-2023

Drupal

How to get vetted role or green shield for module

Aim The aim of this is to obtain a new Drupal role (vetted) after verifying what the user who applies understands about writing secure code that follows the Drupal coding standards and correctly uses the Drupal APIs, following the Drupal best practices. While the application requires users to choose a project they created and for...

by Akshay Singh
Tag: Drupal
28-Mar-2023

Front End Development

Tailwind CSS: Learning For Absolute Beginners

What is Tailwind CSS ? Tailwind CSS is basically a utility-first CSS framework. Rapidly build modern websites without ever leaving your HTML. With utility classes, We can style elements on hover, focus, and more. It is a highly customizable, low-level CSS framework. This CSS framework is packed with classes like flex, pt-4,...

by Mohd Ebrahim
Tag: Drupal
06-Feb-2023

Drupal, React.js

Loosely Coupled: Open Drupal Ajax dialog boxes from React via Drupal Behaviour

Dialogs are a quick and easy way to display additional information without reloading the entire page. Dialog boxes can display just some static text, any node or form of your page, a views page, or any custom markup you'll feed them. In order to open some link/node/page in a modal window, you can add the following structure to the link...

by Deepali Bansal
Tag: Drupal
03-Jan-2023

Drupal

Content Moderation and Workflow with Email Notification in Drupal 9

Creating editorial workflow using content moderation is used to speed up the publishing process. Imagine a website has 10 content types, hundreds of contents for each content type, and daily contents are updated or added by a single admin user who has the publish and unpublish permission. So admin user can verify and publish each content...

by Shubham Joshi
Tag: Drupal
30-Dec-2022

Drupal, React.js

Loosely Coupled: Pass data to React app via drupalSettings

There may be a need to pass a variable, checkbox settings, or some global settings from drupal to react. This can be achieved by passing data from drupal into an API and consuming the same API in react. But why call an extra API when we can achieve it without it? We will be using #attached/drupalSettings to accomplish this. Step 1:...

by Deepali Bansal
Tag: Drupal
29-Dec-2022

Drupal, React.js

Loosely Coupled: Integrate React JS into Drupal sites

React is a JavaScript library that makes it painless to create interactive UIs. Unfortunately, embedding React into a Drupal site is not straightforward. In this article, I will show you relatively simple methods of how to do so. React can be integrated with Drupal in 2 ways: Fully decoupled Partially Decoupled (Loosely...

by Deepali Bansal
Tag: Drupal
27-Dec-2022

Drupal

Progressively Decoupled App With React on Drupal

Decoupled Architecture To understand the term “Decoupled” we need to understand what “Coupled” is. A coupled (also known as “traditional” or “monolithic”) CMS knits together the front- and back-ends. Working off the same application, developers and content managers make adjustments to the back-end while users interact...

by Shubham Joshi
Tag: Drupal
10-Nov-2022

Drupal

Check Drupal coding standard by phpcs in git pre-commit hook

In this tutorial, you will learn how to improve the custom code, theme and module, and general code development by using the pre-commit hook on git. Git pre-commit validates Drupal coding standards on files before committing them and returns a message to fix each line of code on the files having errors. ...

by Rajveer Singh
Tag: Drupal
08-Nov-2022

Drupal

Services and Dependency Injection in Drupal

Drupal 8+ is build upon Services and many place of the system available through the Dependency injection. So its important to understand the concept of services and DI. Services : Service is any object managed by the services container. or we can say that services is a simple PHP class with some methods. we can access these services...

by Dharmendra Singh
Tag: Drupal
05-Nov-2022

Drupal

How to create custom Rest Api

In this tutorial, we will learn how to create a custom RESTful Web Service in Drupal 9. Before creating Rest Api, we need to know what REST API is. An application programming interface (API or web API) allows interaction with RESTful web services. Where REST is known as Representational State Transfer. First, We will need to...

by Amrit Pal Singh
Tag: Drupal
03-Oct-2022