pretty_url
The Pretty URL module enhances Drupal Views by transforming exposed filter URLs into clean, human-readable, and SEO-friendly formats.
By default, Drupal uses complex query structures for exposed filters, especially for taxonomy terms (e.g., ?category[12]=12). This module allows site builders to enable a simplified URL format such as:
?category=web-development,drupal
This improves usability, readability, and shareability of filtered Views pages.
🚀 What This Module Does
Converts exposed taxonomy filter query parameters into comma-separated, readable slugs
Automatically maps those slugs back to taxonomy term IDs internally
Maintains full compatibility with Drupal Views
Works per-filter using a simple checkbox in the Views UI
Keeps backward compatibility with default Drupal query formats
⚙️ Features
Clean and SEO-friendly URLs for exposed filters
Per-filter enable/disable option in Views UI
Supports multiple values using comma-separated format
Automatic conversion of slugs to taxonomy term IDs
No impact on existing Views functionality
🧩 How It Works
A new checkbox “Enable pretty URL for this filter” is added to exposed filters in Views.
When enabled, the module:
Reads clean URL parameters (e.g., web-development,drupal)
Converts them into corresponding taxonomy term IDs
Rewrites the request internally so Views can process it normally
A small JavaScript integration ensures consistent behavior on the frontend.
⚠️ Limitations
Currently supports taxonomy exposed filters only
Slug matching is based on taxonomy term names
Case and formatting variations are handled with basic normalization
🛠️ Use Cases
Blog or article listing pages with category filters
SEO-optimized content discovery pages
User-friendly filtering for large taxonomy vocabularies