Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Snippets are small pieces of Drupal code that others have found useful and shared with the community.
Warning: USE THIS CODE AT YOUR OWN RISK! No one checks the snippets found in the handbook. Do not apply a snippet to a production server without first testing in a development environment. Additionally, you should read the comments on a snippet's handbook page before applying code.