Turn node/%/customPath to path/alias/customPath

Created on 7 March 2019, almost 6 years ago
Updated 22 July 2023, over 1 year ago

Hi,

First, I apologize if this is something already answered somewhere else.

Note: I'm using pseudocode for the patterns.

1) I have a URL alias pattern for a content-type (let's call "Business Type").
The pattern is "[node:title]"
Example:
baseURL/restaurant
baseURL/lawfirm
baseURL/fashion

2) I have a URL alias pattern for a second content-type (let's call "Business"). In this content type I have a reference field to Business type.
The pattern for this second content type is "[referencedBusinessTypeTitle]/[node:title]"
Example:
baseURL/restaurant/myRestaurant
baseURL/restaurant/myRestaurant2
baseURL/lawfirm/myLawFirm
baseURL/fashion/myFashion

I need to create a "info" path for this second content type.
Example:
baseURL/restaurant/myRestaurant/info
baseURL/restaurant/myRestaurant2/info
baseURL/lawfirm/myLawFirm/info
baseURL/fashion/myFashion/info

If I create the following route path, it works.
'/node/{nodeID}/info'
When I visit Drupal's path, it works (ex: /node/100/info, /node/101/info, /node/102/info, etc..)

However, the path alias does not work with "info"
baseURL/restaurant/myRestaurant/info

I tried to change the route path to
path: '/{bussinesTypeName}/{bussinessName}/info'
This does not work apparently because of the following statement (drupal.org)

Note that the first item of the path cannot be an argument

At this stage of the project, I can't add a static path as first argument.
Is there a way to create a route path "info" that will work with my existing pathalias pattern?

Thanks in advance.

💬 Support request
Status

Closed: won't fix

Version

1.0

Component

Code

Created by

🇦🇷Argentina sharif.elshobkshy

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024