Skip to main content
Home
Techies Briefcase
~ by Hari Venu

Main navigation

  • Home
  • About me
  • Photos
  • My Bookmarks

Breadcrumb

  1. Home
  2. Programmatically Unchecking The "Generate Automatic URL Alias" In Drupal 10

Programmatically Unchecking the "Generate Automatic URL Alias" in Drupal 10

By hari, 12 June, 2024

In Drupal 10, there may be instances where you need to programmatically control the URL alias generation for nodes. Specifically, you might want to uncheck the "Generate automatic URL alias" option when creating or updating nodes. This is useful in scenarios where you need more control over the URLs of your content, such as when implementing custom SEO strategies.

In this blog post, we'll explore how to achieve this using Drupal's API.

Introduction

Drupal's Pathauto module is commonly used to generate URL aliases based on configurable patterns. However, there are times when you might need to disable this automatic alias generation for specific nodes. This can be done programmatically by modifying the node's path property.

Conclusion

Programmatically unchecking the "Generate automatic URL alias" option in Drupal 10 is straightforward. By modifying the pathauto property of a node's path field, you can gain fine-grained control over URL alias generation. This technique is particularly useful for custom SEO implementations or when you need to manage URLs manually for specific nodes.

 

Tags

  • Drupal
  • URL
 

Topics

  • Composer
  • Commad Line Tools
  • JavaScript
  • Drupal
  • Solar Panel
  • Permission
  • Libraries
  • MySQL
  • Commad Line
  • RSA
  • VSCode
  • Windows
  • Entity Query API
  • Ubuntu
  • Bash Script
  • Drush
  • Bower
  • Errors
  • Workflow
  • File API
  • Docker
  • Linux
  • Lando
  • Articles
  • Views
  • Nginx
  • Twig
  • Multilingual
  • OOPs
  • Coder
  • Solar Power
  • PHP
  • Field API
  • Android
  • Cache
  • Webform
  • jQuery
  • phpcbf
  • Ajax API
  • Distribution
  • Drupal Behavior
  • Learning
  • kali
  • professional development
  • Neuron AI
  • Jellyfin
  • SSH
  • URL
  • Macbook
  • WSL2
  • Drupal AI
  • NPM
  • Git
  • Form API
  • phpcs
  • Drupal Console
  • Codesniffer
  • Moderation
  • PHPSeclib
  • Taxonomy
  • Mac OS
RSS Feed

Who am I !!!

Hari Venu V
harivenu.v1992@gmail.com
Mobile : +91 9895164181
Whatsapp : +91 9895164181
Linkedin
Drupal.org
Github

Document
Resume.pdf (114.38 KB)

Work !!!

Fulltime Developer @ QED42
hari.venu@qed42.com
Linkedin

Powered by Drupal & Maintained by Hari