Questions tagged [path-aliases]

Use it for questions about path aliases, a way of creating pretty human readable URLs to replace system URLs like node/[nid].

Filter by
Sorted by
Tagged with
58
votes
8answers
98k views

How do I get the current path alias or path?

How can I get the current alias and/or path in Drupal 8? In Drupal 7 I did this with drupal_get_path_alias(). What is the equivalent code I should use in Drupal 8?
-1
votes
0answers
22 views

How to bulk update path using drush and pathauto?

Is there a way to bulk update paths, using pathauto and drush in Drupal 7?
0
votes
0answers
17 views

URL translations transposing between primary and secondary languages or just displaying wrong

We have a Drupal 8.7.10 site, multilingual (17 countries localized with 2 or more languages each). In the example I am attaching, we have a "people" page where we are listing people for our company ...
0
votes
1answer
776 views

When adding Content: has taxonomy term id contextual filter to view and check specify validation criteria box, why don't I see validation options?

My request is closest to these two questions: Filter by multiple taxonomies in URL Views contextual filters taxonomy name I have a view which is a page and displays node titles in a table format ...
0
votes
1answer
2k views

Pass URL alias info to default value of Webform field

I'm running the Storm (project management) module and for each task, the user needs to fill out a form regarding information about the task, including uploading images about certain information ...
0
votes
2answers
577 views

Pre-populate an Entity Reference when Adding a Node : Based on URL Alias

I am trying to pre-populate an entity reference with a specific game node, when a profile node is added; based on URL of the game the add button is on. The game node I want to reference in profile ...
0
votes
0answers
43 views

Query params in url does not appears in node url after updating

I need to append node path programmatically to make the url look like [the link]?utm_source=Home%20Page&utm_medium=website&utm_campaign=AB%20Test&utm_content=Headline A I'm updating node ...
2
votes
1answer
44 views

How deal with taxonomy term parameter in multilingue site?

I have a custom controller, who take the tid parameter : /myroute/{tid} The tid is upcast with the taxonomy Term so in my controller method I have: public function index(TaxonomyTerm $tid) In this ...
0
votes
1answer
1k views

Change url alias for user profile pages based on role

I have two sets of users, faculty and staff, with corresponding Profile2 profiles. I can't figure out how to get different paths for users dependent on roles, e.g, staff/userid or faculty/userid. I'...
1
vote
1answer
611 views

Redirect to 404 page, if URL alias does not exist

I am developing multilingual site in Drupal 8. I added content in Turkish language and did not create any translation for that node. Suppose node ID is 123, so system URL is http://example.com/tr/...
0
votes
1answer
223 views

“Route entity.path_alias.collection does not exist”

I was using Drupal 8.7.7 and decided to update it to 8.8.1. After that the back-end side of the site isn't working anymore, I can only access the site as an anonymous user. The error I get is: ...
0
votes
1answer
963 views

Pathauto insert taxonomy term custom url

I have change the url of an taxonomy term. Now when i use a field with taxonomy term the url is showing like this: [node:field-taxonomy:parents:join-path]/[node:field-taxonomy:name]/[node:title] ...
1
vote
1answer
1k views

Multiple URL aliases for same node

I have the following URL aliases for the same node. /products/single-room/product-listing/wall-mount /products/multi-room/product-listing/wall-mount I have two details button Single & Multi-...
0
votes
1answer
349 views

How can I use tokens for Addressfield values without using Addressfield_tokens?

I would like to use the Town/ City field as a token for Pathauto. I thought the Addressfield_tokens module was perfect for this, but Entity Tokens breaks Pathauto's patterns control panel; the issue ...
4
votes
4answers
4k views

How do I translate view's page path alias?

I'm able to translate views titles and menus thanks to config_translation core module. I would like to have path aliases translated as well but it seems to lack this feature. Any other way to do it?
3
votes
2answers
376 views

Custom Path Alias with Initial Letter as Token

For various reasons, I need to change my custom path alias for a taxonomy type as follows... FROM: /composers/aardvark TO: composers/a/aardvark So I'm looking at either creating a custom token, or ...
0
votes
1answer
19 views

Need multiple url paths for single node without redirecting

I have the requirement on our Drupal 7 site where if we have a single node we need to be able to have multiple url paths to reach that node. For instance lets say we have a node with id 1234 ...
1
vote
1answer
496 views

Creating multiple URL aliases for the same node with their own context

I want to solve the following problem with Drupal 7 solely using existing modules and without any extra code. I have a contenttype called 'News' I create a news item and assign a taxonomy term called ...
0
votes
4answers
348 views

Create two nodes with url aliases on one submission

I have a content type "News". With URL aliases pattern and token the URL is like this: news/[node:title]. Is it possible to create two nodes on one submission with different URL aliases? Let's say on ...
1
vote
1answer
32 views

How do I modify the URL to a taxonomy term?

I have a vocabulary called Industry with four terms. I have edited the terms to keep the URL to be automatically generated. They are following this convention: industry/term1, industry/term2, etc... ...
1
vote
3answers
609 views

Show 404 on page for node path url instead of redirecting to it's alias

I'm currently using the Redirect module in Drupal 8 along with Pathauto to create aliases on all url's. So for example /node/23 would be /article/some-text-here. When a user types in /node/23 in the ...
0
votes
1answer
15 views

How to create programmatically multiple URL alias of same taxonomy term?

I have category cars and I want to create its URL alias according to the region like if the user location is Australia than URL will mysite/australia/cars similar if the user location is USA than URL ...
2
votes
1answer
367 views

Language switcher does not display the correct link to the default language path

I maintain a bilingual English/French website and the Language Switcher block is available on every page to allow the user to switch language. It works except on one particular taxonomy term page and ...
2
votes
3answers
6k views

anchor (#) in url alias

I want to open same page from different contents. So I need to generate link like /testimonials#group-1 for these contents. I used pathauto module for this. I made pattern for this category ...
24
votes
7answers
37k views

Get path alias from NID (or node object)

I have a node object, and I am trying to use it to get a given path in Drupal 8. There was drupal_lookup_path() in Drupal 7 but I'm not seeing any equivalent or documentation for Drupal 8. What's ...
0
votes
1answer
13 views

MiniOrange SAML SSO Drupal Module – Multilanguage Support

This is my first post at Drupal StackExchange. Please feel free to redirect it to the proper forum if this is the incorrect one. How do I configure Apache Server so that MiniOrange SAML SSO Drupal ...
16
votes
3answers
12k views

How can I get the node ID from a path alias?

I want to be able to get the nid but the only information I have is http://example.com/this-is-the-alias. Is there a way to get either the internal path of /node/* for that alias if I am not on the ...
2
votes
0answers
1k views

Get the node ID from the path alias [duplicate]

What is reliable way to get the node id from the path alias in Drupal 8?
2
votes
1answer
45 views

How do I programmatically delete a node by internal url alias?

How do I programmatically delete a node with a specific internal url alias? Background: We are trying to delete this node so that it can be replaced during an update hook.
0
votes
1answer
428 views

Same path for different domains

I have Drupal 7 with Domain Access on it. On the main domain i have an About us page with the path www.example.com/about-us How can i get same "/about-us" path on several subdomains like domain....
2
votes
1answer
474 views

Ignore parts of the url or dynamically rewrite/alias the url

I am having a problem and have been wrecking my brain over it... I feel I might ohh how did I not think of that moment once I find the solution... Basically, what I need to do is: For any url ...
1
vote
2answers
507 views

How to create a organic group path alias

I'm trying to create a path alias for a node type, where the first part of the alias is the url path of the organic group. I tried this [node:og-group-ref:1:url]/[node:content-type]/[node:title] ...
0
votes
1answer
511 views

a href links not showing url aliases

I am using redirect module with Drupal 8 latest version. It is working fine when we open any node in url, it converts node to the path alias. But issue is with a href links. When we hover on any "a" ...
1
vote
1answer
545 views

Redirect taxonomy term page links to a View page's exposed filter

I'm trying to make every taxonomy term page link direct to a pattern like this: /viewpage?[term:vocabulary][]=[[term:tid]] So, for example instead of material/bronze where bronze has term id 7, ...
1
vote
1answer
410 views

URL aliases and Entity Translation (menu name replacement pattern)

I am using entity translation (Field translation) for my nodes, and set the menu name on each 'page'. The menu itself is arrange to basically have a duplicate tree in the same menu each with a ...
1
vote
1answer
653 views

How to create URL alias for node edit page

Pathauto can create URL alias for node view page, for example, URL from node/nid to project/nid (project is a name of content type), but the link to the edit page is not /project/nid/edit, but /node/...
0
votes
2answers
488 views

How to stop redirecting to newest URL after updating a node

I have setup 2 aliases for each node of a content type called "property". The first alias is like example.com/texas/village-apartments and the second is example.com/texas/corp/village-apartments. ...
1
vote
1answer
459 views

Referencing parent entity

I've just started with Drupal and I'm trying to create the following URL structure with PathAuto and Entity Reference: Category A -> Category B -> Category C Resulting in category_a/category_b/...
3
votes
1answer
551 views

How to use url alias in views for taxonomy terms?

On a Drupal 7 site with pathauto installed I'm using a view to show all taxonomy terms of a given node. The terms are linked to the term's page. The problem is, that the path of those terms does not ...
6
votes
7answers
5k views

Bulk update for unchecked “Generate automatic URL alias”

I have a lot of programmatically generated nodes with the option "Generate automatic URL alias" unchecked, so i can't use the Bulk Update of the pathauto module. How can i to bulk generate the ...
1
vote
0answers
13 views

How to add an alias filter to the media view?

I have a path alias for my media content provided by pathauto. The media view at 'admin/content/media' shows all the content. I am able to add filter for the media entity name, type, language and ...
0
votes
0answers
19 views

View with Taxonomy Path

We have a taxonomy vocab called Phones that goes like this. Taxonomy: Phones -Nokia --3310 --Jitterbug --7.1 -Samsung --Galaxy S6 --Galaxy Edge --S7 -HTC -- one --S7 list goes on, but you get the ...
1
vote
1answer
615 views

Passing arguments to a node with an alias url

There is a similar issue in here: Passing an argument to a node causes 404 But there is no real viable solution. I tried using the sub-pathauto module but the restiction of 8 arguments is too little, ...
4
votes
1answer
628 views

Import URL Alias with Node

I'm using ne-impot and ne-export with drush for importing and exporting nodes. When exporting, as part of the uuid module, the URL alias is included with the export. However, when importing a node, ...
1
vote
1answer
47 views

what happen if i have the same route as path alias?

What if I have the following route in a custom module and a path alias that is equal to the route path? mymodule.contact: path: /contact defaults: _controller: Drupal\mymodule\Controller\...
0
votes
1answer
594 views

Mask a dynamic URL

Is there a way to mask a dynamic url in Drupal? Original URL: site.com/user/%/orders Masked URL: site.com/orders
1
vote
2answers
600 views

Views, Pathauto and contextual filters

My question is rather simple, but I didn't manage to find anything that can help. Summary of my setup : Pathauto Views Entity Reference So I have various custom content types, which I want to ...
0
votes
0answers
21 views

CKEditor Link to write full alias instead of node ID?

Using CKEditor's CKEditor Link plugin in a WYSIWYG field is a quick way to link to internal content. When the page gets rendered, the link URL is written using the node ID, like this /node/123 instead ...
0
votes
1answer
19 views

Change path of uploaded files in zip

I've a form that allow the customer to download every photos that a photograph uploaded before. Here is my submit form : public function submitForm(array &$form, FormStateInterface $form_state) ...
1
vote
1answer
71 views

How can I get translated path aliases for a custom language switcher?

The Drupal 8 standard "Language switcher" dropdown does not give me what I need. What I need is to break everything apart into groups and subgroups, in a div, and have custom text for each Language, ...