Add Custom Tokens in Custom Module for Drupal 9

grayscale photography of person holding coin or token

In Drupal 9, you can create custom tokens using the Token API for your custom module. The Token API provides a central API for modules to use to provide tokens. Tokens are placed into text by using the [type:token] syntax, where type is the machine-readable name of the token type, and token is the machine-readable name of the token within the type.

Drupal: An Open Source Content Management System for Websites and Applications

Drupal is a popular open-source content management system (CMS) that has been around for over two decades. It is widely used for creating websites, intranets, and web applications, and is known for its scalability, security, and flexibility. With a large and active community of developers and users, Drupal has a wealth of modules and themes available that can be easily integrated into projects.

Configure Solr Server for Search API in Drupal 8 or 9

Sabri Tuzcu - Drink some coffee

Prerequisite

  • A Solr server running either on your local environment or on another server

Create a new Solr server

  1. Open your browser and login to your Drupal site
  2. Go to Configuration -> Search and metadata -> Search API
  3. Click the Add server button
  4. In the Add search server page, enter the following information
    • Server name: Solr
    • Backend: Solr
    • Solr Connector: Standard
    • Solr host: staging.upanupstudios.co

Update Drupal 9 core via composer on your local environment

Drupal
  1. Open the terminal app (or the terminal in VS Code) and change to the root site directory of the site you are updating
    cd [path/to/site/root/directory]
  2. Switch to the main branch and fetch the latest changes
    git checkout master
    git fetch --all
    git pull
  3. Create a new branch from the main branch for the Drupal core update
    git checkout -b update/core-[version]
  4. Upda

Drupal 9 Launch

Drupal 9

Drupal 9 is here! I’ve been working with Drupal for the past seven years now and have grown to love it. I started out with Drupal 7 and although it was a steep learning curve from what I was use to building sites with, it got easier once I got deeper into the code and understood the architecture of the software and API, especially with Drupal 8.