Drupal is a flexible, open-source content management system (CMS) for building complex websites and applications.

Reset the user password drupal 8 programmatically

In this page you can see how you can update the password of any user in drupal 8 programmatically

There are several case in which you don't have the database access and also if you don't have email service working on drupal 8 website and if you want to reset the password and then this approach will help.

I assume you know how to create basic custom module in drupal 8. Here I am creating a controller class and write code in public function to execute the code using path.

Firstly Create the routing file and give a path like below:

variable_get and variable_set in Drupal 8

As we all know drupal 7 has some very usefull core feature which can we use to our customization of custom or core configraution, In variable_get and variable_set is also an important function to use small piece of data with create any new table in drupal.

In drupal 8 that function is removed, but some equivalent services are provided by drupal for the developer to use when its required, so let's see how you can use these in this tutorial.

In Drupal 7:

- Variable can set by using :

Custom twig template for Drupal8 Custom module routing

Briefly in this tutorial you can learn how to create a custom template using hook_theme in drupal 8 for your custom routing.

basically the custom route is handle by controller method or by the form to display, etc so the question is can you create the custom twig template for that or not, so answer is yes. you need to follow the below steps and you are done.

let's start

how to use db_query in drupal8

Hey again, again we are come up with drupal8 useful functional to use.

today we see how we can use db_query in your custom module to fetch the complicate data, avoid the joins and conditions. db_query usually use to fastest way to doing these kind of jobs. let check below how you can use it

As we know drupal8, we need to database connection we need at the class in our custom module but you can add the class inline as well, like this 

How to add node ID class with node type on body tag drupal 8

Hey, again with new solution with new article, in this article we are going to see how we add node ID class with node type to drupal 8 as like drupal 7 format

{node-type}-node-{node-id}

In drupal 7 above format class displayed on node to differentiate with other nodes, but in drupal 8 by default it was not present so we can achieve this easily using hook_preprocess_html in drupal 8

How to render login form or register form on theme template drupal 8

This tutorial shows you how to render the core login form in our template, or using this you can render any form in your template files according to your customization.

We know the drupal 8 uses the form builder to make the form, there is also getform function that get the form components and renderer servcie will render it.

let see how will you achieve this.

firstly we get the form and 

Views Conditional results in drupal 8 Views

Hi, We are here today with new interesting tips and tricks about drupal 8 views.

In Drupal 7 we now that if we want any conditional based result we can use "Views PHP" to apply and generate the conditional based result, But How in drupal 8 we use that conditional views results, this tutorials explain it to you.

Let take a example:

Suppose you want to show additional text with Gender field

For that I have created a field List(text) field with 3 option: Male,Female and other

Subscribe to Drupal