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
2
votes
2answers
184 views

nodes in views and views in search results

I'm building a website, where I don't want to display nodes directly. All nodes are presented using Views. The idea is that i've got 10 basic pages without content. On each of these page I've got one ...
2
votes
1answer
233 views

Pathauto: Custom punctuation replacement

Instead of having Pathauto replace punctuation in the path alias with a default separator ( dash for example ), or remove it, can we somehow specify a custom input to replace with? For example, " ...
2
votes
1answer
279 views

How to get Page Manager to react on path alias before node/%node

I have a CTools Page Manager Panels Variant that I want to apply to a whole load of different content, based on paths. Basically I want this Page Manager Page to handle all paths matching: foo/*/* ...
2
votes
1answer
85 views

Taxonomy View and Paths

I have a view set up to display all my taxonomy nodes for "Classified Categories" Vocabulary, in the view I have set up the path to be /Dogs however when it lists the terms they are all linked to /...
2
votes
1answer
672 views

update hook to delete and bulk update pathauto aliases

I have put all of my SEO settings into a feature, in order to migrate the settings from a dev site to a live site. Is there a way to write an update hook that will delete all of my existing content ...
2
votes
1answer
396 views

How to truncating url at the word instead of limit

Background info: By default, Pathauto has a maximum alias length is 100. Request: It would be nice if this could truncate at the last space before the limit, instead of truncating directly at the ...
2
votes
1answer
374 views

Path Auto Use Parent Tag, If it doesnt exist use current tag

OK. I have Pathauto and Token I have the following Tag Structure: Drinks > Beer I want to use path auto to make all nodes tagged with Drinks or Beer to have a URL of /Drinks/[Node:title] So ...
2
votes
1answer
215 views

Should I rewrite my links into aliases?

Is it of any advantage, in addition to using Global Redirect, to rewrite html links from /node/nid to /article/this-is-the-title, even though in both cases traffic is directed to /article/this-is-the-...
2
votes
2answers
160 views

How to change the language of inserted or updated paths to LANGUAGE_NONE using a module?

All path aliases are entered by hand. I need them to be language independent. Currently they are created/updated in the language that the user is currently using which does not make sense in case of ...
2
votes
1answer
625 views

Setting up catalog taxonomy

I'm fighting with pathauto patterns for a particular content type. The content type is bound to a taxonomy (a product catalog). I thought that the taxonomy tree should only hold container items (...
2
votes
1answer
324 views

How can I create an alias to point to an uploaded file?

Users uploading a file within content create a name like my_site.com/sites/default/files/import/CrazyLongNamefile.pdf They would like to alias it for referencing in other media (print) like my_site....
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
0answers
58 views

Why would routes lose their aliases?

I have experienced this twice now on a Drupal 8 site. Pathauto is at its current version and Drupal is 8.2.6. What is happening is sometimes nodes 'lose' their aliases and revert back to being node/...
2
votes
2answers
906 views

Find Menu Link Title given URL alias, to replace node Title in breadcrumbs

In Drupal 8, how can one determine the Menu Link Title of a node, given its URL and other information like its route & parameters? This is to modify the core path-based breadcrumbs (...
2
votes
2answers
2k views

How to create programmatically menu links with just created nodes during installation profile in aegir ?can't get nid!

I am creating a set of nodes in an installation profile. When I try to create menu links for them in the same PROFILE_NAME.install, the links don't get created. I have also tried creating the menus ...
2
votes
1answer
94 views

How to change taxonomy term path for table and grid view

I am using taxonomy term module. I have categories vocabulary and in term so many categories and I have created the view using taxonomy term. With two page first is in table format and another is ...
2
votes
2answers
209 views

How to add a term ALIAS(!) to content URL pattern?

I have latest Panopoly distribution installed (with Drupal 7). What I need: my content items of a certain content type to have the f-g URL: "vocab term URL alias"/"Node-title" (first part of the ...
2
votes
0answers
115 views

Pathauto does not Transliterate when creating a node programatically (works when manually creating)

Drupal 7 Here is my code: <?php $languages = language_list(); // get all languages $preferedLang = "sv"; global $language; $language = $languages[$preferedLang]; $node = new stdClass(); // ...
2
votes
0answers
66 views

Advice for Image Management with New Site

I am looking for the best image management options for a new Drupal site. The original site has several thousand images, and a dynamic site is expected to explode that number to tens of thousands. I'...
2
votes
1answer
503 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 ...
2
votes
2answers
2k views

URL encoding of en-dash [closed]

I had a link: www.example.com/issues/issue-week-2012–2013/poem1 But it is encoded as: www.example.com/issues/issue-week-2012%25E2%2580%25932013/poem1 This is an URL alias, the en-dash (between "...
2
votes
2answers
71 views

How to display a block for some paths but not if they match some other path also?

Let's say I have nodes with the following paths: /chapters/university-of-florida/classrooms/class1 /chapters/university-of-chicago/classrooms/class2 /chapters/ucla/classrooms/cla I'd like to display ...
2
votes
0answers
94 views

subpath url alias does not seem to fire 404

I'm using subpath_alias, so /node/4/video alias is available too. But now, and I'm not sure subpath_alias is involved, /node/4/foo does not fire 404 and instead it shows the page as if it was /node/4. ...
2
votes
1answer
108 views

Failed validation redirects to normal path

I'm using the sub-pathauto module. I can edit node 1 of type list from the path list/1/edit. However, when validation fails I'm redirected back to node/1/edit (the normal path). Is this a known ...
2
votes
0answers
24 views

Some pages ignore token [closed]

My node alias pattern is [node:title].html. Some pages of the site shows a .html extension and some don't. I don't know what is the best way to fix that (Update the aliases didn't work, and Deleting ...
2
votes
0answers
131 views

Change url of nodes in the past - Pathauto; Date module

I have a content type that includes the date module as a field type. Some of these nodes have the date set in the past and some in the future. I have been able to have only the nodes that have the ...
2
votes
1answer
147 views

Calling /user page with username instead of uid results in database exception due to failed string to int conversion

When I use a username as an url parameter like: 'www.example.com/user/adam' instead of 'www.example.com/user/27' I get a database exception: Error message PDOException: SQLSTATE[22018]: [...
2
votes
1answer
369 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
1answer
292 views

How do I add a term reference name to the Pathauto pattern for a content type?

I'm trying to create a website with 2 sections, Home and Business. For this I have created a vocabulary called 'Page Type' and added those section names to it. I've added a term reference field to my ...
2
votes
1answer
62 views

Duplicated content on homepage

I've found that my site is showing duplicated content, I think it was when I installed Pathauto. The nodes are not duplicated though but seems to be multiple aliases. I've since tried using Global ...
2
votes
0answers
227 views

Two pattern aliases for a node type

I am using panels with a Node template to override the view of a content-type Employee. At the moment I am using pathauto to give a clean url of /Employee/[Employee-Name]. I'd like to use the panels ...
2
votes
2answers
303 views

Strict case in content URL alias

(Pathauto: Leave case the same as source token values) When I create a node with "Nullam vehicula pharetra" as title, the Pathauto module will create /content/Nullam-vehicula-pharetra as URL alias. ...
2
votes
0answers
255 views

Taxonomy term view page for terms with same name but with different term id?

I have several taxonomy terms that have the same name but different term id in a same hierarchical taxonomy vocabularies. I would like to display them in the same term view page. Example: -line-1 ...
2
votes
0answers
240 views

How can I display parent and child terms from a CCK Taxonomy field in Pathauto?

How can I have two (or more) different taxonomy vocabularies appear in my Pathauto settings at the same time? For example, if I want to use the 'location' vocabulary and the 'accommodation type' ...
2
votes
2answers
2k views

Drupal multiple node url aliases

Is it possible to take a field from my node and create a url alias from the content of that field? Say I have a node type article. This gets its normal url via pathauto, but I also wish to be able to ...
2
votes
1answer
800 views

Using pathauto to create multiple aliases, one for each term?

If I have a taxonomy tags so that I can tag a node with foo and bar and baz, is there any way to make the pathauto module create three aliases? If it would normally create content/my-new-node, is it ...
1
vote
3answers
108 views

Where and how to conditionally redirect old aliases to new aliases

We are replacing a website with a new version. The domain is the same, but URL aliases in the new website are different. In many cases, I can use an old alias to calculate its corresponding new ...
1
vote
1answer
805 views

What is the replacement of drupal_match_path()?

What is the replacement of drupal_match_path() in Drupal 8? The following function is removed from Drupal 8. How can I achieve same functionality in Drupal 8? function drupal_match_path($path, $...
1
vote
1answer
97 views

Specific URL for each kind of content

I would like each kind of content to have its own base url, for example, example.com/international-news/friendly-url-of-node-id How can I manage to get both a friendly url and a base url (friendly-...
1
vote
2answers
2k views

Use taxonomy path for a node's path alias

Is it possible to use a token to reference the alias of a taxonomy term in the pattern of an automatic alias for a node type where that term has been selected, in Drupal 8? (Let's assume a single ...
1
vote
4answers
1k views

How do I export the list of URL alias into an excel or csv?

I am beginner and have recently started to work on Drupal website that has been implemented at my work place. I would like to export the list of URL alias to an excel or csv file so that we can look ...
1
vote
1answer
2k views

How to get term alias in twig templates

I have created a block to show the sibling terms of the term being viewed. In the twig template I am looping through the terms to display the names linked to their respective pages. Now I unable to ...
1
vote
3answers
2k views

Mapping or migrating path alias using using Migrate Source CSV

I am importing content from SharePoint into Drupal 8 using Migrate Source CSV and a large CSV file. I successfully mapped id,title,body,date. But I cannot map the path alias? In Drupal 7 the Feeds ...
1
vote
1answer
1k views

Domain Access with URL Alias - same content, but with different automated aliases

I have a site running Domain Access with two domains - the primary domain and the sub-domain. Both domains share the same content in the database, but I would like the automated URL aliases for the ...
1
vote
2answers
251 views

How to remove partricules and apostrophes in url

I'm using drupal 8 and Pathauto. I have title of the type (in French) Personnes d'Allemagne, I would like to delete d' to have like url personnes-allemagne. Pathauto removes the apostrophes well, ...
1
vote
1answer
87 views

How to display the path without alias?

With Drupal 8 and Commerce 2.10 I created a php code to display the link of my store. When I go to the link, it displays: https://www.domaine.com/shop/name I want to display without alias: https:/...
1
vote
3answers
414 views

Redirect to main view URL when no contextual filters are set

I have a view in drupal 7 with no contextual filters at all set. Let's say it is a simple list of nodes of the type "item" and that the url is http://example.com/listofitems I also have pathauto ...
1
vote
3answers
1k views

In hook_node_insert drupal_goto with alias name not working

In hook_node_insert() i have used drupal_goto(), to go to the newly created node with alias name of it, but id doesn't work. I have already created url alias with patterns for that content type. $...
1
vote
2answers
4k views

Replace rewrite output URL aliases

Is it possible to rewrite parts of taxonomy terms URL custom aliases before output, for example with something similar to the the following code? function replace_term_url ($term_alias) { // ...
1
vote
1answer
5k views

get taxonomy term aliased path when its a referenced field in a $node entity

what I have is a $node and know how to get its aliased URL but I also have a field field_category that I know how to get the name but how do I get the url alias for it $nid = 1; $node = \Drupal\node\...

1
3 4
5
6 7
16