Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

views_url_path_arguments

2,344 sites Security covered
View on drupal.org

SUMMARY

Simple module to convert a view contextual filter entity id into its url path. The extended example uses nodes, but it should work with any type of entity.

Extended use case: A website has a view that uses node reference or entity reference to filter the results set. For example, a regional location node is a node reference on a bunch of news stories. The view is setup to filter and show only news stories in the Chicago region and not any news stories from any other regions. Rather than using nid for the contextual filter (which isn't SEO friendly) these plugins allow the ability to use SEO friendly url path / path alias.

example.com/news-stories/chicago
                         ^^path alias argument
           chicago converts to a nid for normal views contextual filter processing

REQUIREMENTS

INSTALLATION

CONFIGURATION

There are two plugins available in this module. The default argument plugin should be used with blocks or things that don't naturally have arguments available to them. The validator plugin should be used to convert the nid for views that naturally have arguments available to them, such as pages. They can be used together if a view is rendered in both a block and a page. Or seperately if the site's view is rendered only as a page or only as a block.

  • Configure contextual filters in Administration » Structure » Views » view: Add a contextual filter i.e. Content: Nid
    • Argument not available to views? Use: When the filter value is not available » Provide default value » URL path alias from URL
    • Argument available to views? Use: When the filter value is available or a default is provided » Specify validation criteria » Validate URL path alias

FAQ

Q: Why would I use this module?

A: For SEO purposes you want to use the url path a.ka. path alias as an argument to a views contextual filter.

CONTACT

Current maintainer: Lucas Hedding (heddn)

Activity

Total releases
4
First release
Jul 2025
Latest release
4 months ago
Release cadence
48 days
Stability
100% stable

Release Timeline

Releases

Version Type Release date
8.x-1.7 Stable Dec 1, 2025
8.x-1.6 Stable Jul 18, 2025
8.x-1.5 Stable Jul 10, 2025
8.x-1.4 Stable Jul 9, 2025