Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Views Bootstrap 5.5.4 — Minor update available for module views_bootstrap (5.5.4). Release: Rightup theme 1.0.3 — Minor update available for theme vartheme_bs5_rightup (1.0.3). Release: CommentOn 1.0.6 — Minor update available for module commenton (1.0.6). Release: ChatGPT Ads 1.0.3 — Minor update available for module chatgpt_ads (1.0.3). Release: Opensolr Search 5.1.3 — Minor update available for module opensolr_search (5.1.3). Release: ServiceM8 Webform Integration 1.2.1 — Minor update available for module servicem8_webform (1.2.1). Release: PostfixAdmin 1.0.0 — Initial release available for module postfix_admin (1.0.0)! Release: ip_analyser 1.0.3 — Minor update available for module ip_analyser (1.0.3). Module Revived: Swagger-PHP OpenAPI 3 documentation generator 1.0.0 — Module swagger_php updated after 10 months of inactivity (1.0.0). Security Coverage: Microsoft Azure AI — Module ai_provider_azure now has official Drupal security advisory coverage.

The module contains a field type which provides 1:1 reflection of "path" property (defined in entities to determine their human-readable URL alias).

Why would I need "path" property as a field?

Some headless Drupal successors (like JSON API) do not provide a way to filter entities by "path" property due to technical limitations (See #2799909: [BUGFIX] Return the alias and allow filtering on it).

It means that if you'd want to implement a dynamic routing from your frontend application (something more human-readable than just /article/[id]) then your app has to know which entity to render when an end user hits /article/[path] page. So far the only way to achieve this is to filter entities by path stored as a field.

Usage

  1. Install the module as usual
  2. Add "Fieldable Path" field to your entity through "Manage fields" page
  3. Create or update any entity

Now you can do the following (assuming you've added the field to "article" node with name "field_path"):

GET http://{host}/jsonapi/node/article?filter[field_path][value]=/my-article

Note that Pathauto is supported, so you can get all power of Drupal to generate human-readable aliases for your frontend application.

What to do if your site already has some content?

The module includes an action which clones path property to the field in a bulk mode. To find it, go to the node / user list page, select necessary items and pick "Copy path to Fieldable Path field" in the action selection dropdown.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Apr 2023
Latest release
3 years ago
Releases (12 mo)
0
Maintenance
Dormant

Releases

Version Type Core Release date
8.x-1.0 Stable Apr 3, 2023