rakesh.james's blog

Adding A Contextual Filter To A View In Drupal 8

In this article, we will focus on contextual filters. Initially, we will explore the difference between contextual and regular filters. After that, we will create a view displaying content created by the logged-in user.

We will also explore the “WHEN THE FILTER VALUE IS NOT IN THE URL” dialog box and the different options associated with it.

How To Perform A Registry Rebuild Manually In Drupal?

The manual registry rebuild was done to rectify a fatal error that we encountered. A conventional Registry Rebuild did not work in our case. A drush rr command failed as well. We then installed Drush, took a backup of the database and truncated cache_bootstrap and registry tables.

The entire code and steps to perform are featured in this article. Go through them for a novel method to deal with rebuilding registries in Drupal!

Using Views Exposed Filter In Drupal 8

This article takes you through the steps required to use Views Exposed Filter in Drupal 8. Exposed filters provide users with the freedom to sort content on their own. This feature is beneficial, in particular, for online stores where customers seek to filter products of their choice. The filter could be based on price, brand or size.

In this article, a new view is created, a path provided and the display format altered to showcase content titles. The Filter Criteria is then configured. The screenshots accompanying this article will provide you with clear instructions in setting up exposed filters in your application.

Using REST Export With Views In Drupal 8

This article will take you through the steps required to use REST web services with Views in Drupal 8. You will have to install and enable two modules - RESTful Web Services and Serialization. Both these modules are part of a package known as Web Services.

Follow the screenshots accompanying the article as we create a REST Export view, specify a REST Export path and enable json settings. You will have to install a REST client as well. In this example, we have installed Advanced REST client from the Google Chrome browser. As shown in the article, select GET in the REST client to send and receive a 200 status code.

How To Create A View In Drupal 8

This article explains how to create a view in Drupal 8. This is demonstrated in a step-by-step manner through content and screenshots. The article leads you through the paths you will have to navigate in order to configure a view of your choice.

As you go through the article, you will realize that the process to create a view in Drupal 8 is similar to that of Drupal 7. There is one major difference though – the Views module is now a part of Drupal 8’s core. So it will get installed by default during core installation itself. Go through the article to know how different View creation is in Drupal 8 than Drupal 7.

Say Hello world to Drupal 8! [Basic steps involved in Creating a custom module in Drupal 8]

This article takes you through the steps to create a custom module in Drupal 8. If you have worked with module creation in Drupal 7, you will realize there are a couple of more steps required in the new version. The differences stem from the fact that Drupal 8 uses Symphony 2 components. This means you will be dealing with object oriented code in Drupal 8.

The article shows how to create the .info.yml file and the .routing.yml file. The Route Controller Class is also created along with hook_menu().

Follow the instructions provided in this article and enable the module to get the simple output "Hello world!".