Skip to main content
PK's Diary

Main navigation

  • Home
  • Reposts
  • Stories
  • Articles
  • Notes
  • About

Breadcrumb

  1. Home
  2. Reposts

Programmatically updating URL aliases using Batch API in Drupal 8

Drupal has always had excellent support for human-friendly URL’s and SEO in general, from early on we have had the luxury of modules like pathauto offering options to update URL for specific entities, token support and bulk update of URLs. Though bulk update works for most cases, there are some situations where we have to update URLs programmatically, some of the use cases are:

  • Multisite setup -- When your setup has many sites, its inconvenient to use bulk update UI to update aliases for each of your sites. Programmatically updating the aliases is a good choice and can be executed via the update hooks.
  • Conditional Update -- When you wish to update aliases based on certain conditions.

 

Tags

  • QED42
References
Continue Reading at QED42's Website
  • Log in to post comments

Comments

Explore topics

TwigQED42Acquia CertificationDrupal PlanetDrupal CertificationThinkingDrupalOpen SourceLifeBackend Specialist
more tags

Quick Notes

Accessing Translated Entity in Views Twig | Drupal 8
Making a variable available (as global) in all twig files in Drupal
Data Structures and Algorithms - Solved in Javascript | Geeksforgeeks
Create alias for frequently used commands
Acquia Front-End Specialist Exam Preparation Pointers

Recent Stories around me

Software Engineer Interview Experience with Glovo
Why Amazon is better than Flipkart - Indian ecommerce market
Acquia Certified Drupal 8 Grand Master
Seminar at DCRUST on Open Source as Career
A Walk to Remember | June 2015 - August 2018 | QED42

Recent write-ups | PK's pen

How to check if Memcache, opcache or varnish is functional with the Drupal 8 application?
Getting started with ReactJS & Drupal (Fully-Decoupled)
Extending Drupal Translations for Custom Entity in Drupal 7
Google Assistant Integration with Drupal
Art of writing template files - Drupal 8
PK's Diary
Powered by Drupal