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

Prevent “→” from being written in URL alias

When the post title contains "→," it will be written in the URL alias. When using Boost, an URL containing "→" will not be well cached; visitors will see the uncached node. How do I prevent the "→" ...
4
votes
3answers
156 views

Is there an easy way to move non-English selected nodes into a language section?

I have a site in English but it also has a few nodes in Arabic, a few in Aramaic, a few in Hebrew, etc. Is there an easy comfortable UI way to move each group of nodes for a language section? To ...
4
votes
2answers
2k views

What is the equivalent of calling drupal_lookup_path()?

drupal_lookup_path() have been remove in Drupal 8. However, I cannot find a way to achieve the same functionality. All, I'm trying to do is to provide Drupal with a path and he is going to look to see ...
4
votes
1answer
5k views

Path (URL) to call custom module function

I am developing a custom module and I need an URL that would trigger an action when called. The purpose is for an external server to call this address passing some variables through $_REQUEST['...
4
votes
3answers
5k views

Username as a path to Profile page

I am trying to set up username as a main path to the user profiles in Drupal 7; for example, I would like to have mypage.com/someusername as path alias for the profile of the user that uses "...
4
votes
2answers
152 views

URL alias, tokens is replacing 0s and 1s with node and entity [duplicate]

Has anyone seen a case that url aliases or tokens end up replacing certain numbers in a url with the words node and entity. A UTC Timestamp in my url ended up replaced like this: ...
4
votes
1answer
1k views

Can I use Pathauto with additional url values?

Is it possible to use pathauto url aliases and still use additional url parameters? For example, I use pathauto for polls to map "node/123" to "poll/title-of-my-poll". The poll results are at "node/...
4
votes
2answers
1k views

URL alias for File field on a Content Type

I have a File field on one of my content types and I'd like a URL alias for downloading that file regardless of how many times the actual uploaded file has been updated. Any advice? I've been looking ...
4
votes
2answers
1k views

Unable to set Drupal environmental variables using Drush alias

$aliases['opendoor_stage'] = array( 'uri' => 'stage.opendoor.com', 'root' => '/var/www/stage.opendoor.com', 'db-url' => 'mysql://someurl', 'path-aliases' => array( '%...
4
votes
4answers
4k views

Can Webforms include the URL they were submitted from in their emails?

I have a bunch of webforms in blocks on taxonomy pages. It would be helpful for the recipient of the resulting emails to know what taxonomy page the user was on at the time they wrote their query. Do ...
4
votes
1answer
169 views

How to apply a sequential number pattern in Pathauto?

If the path name is same, I want to show display as below. I want: example.com/blog/path001 example.com/blog/path002 example.com/blog/path003 ... currently: example.com/blog/path example.com/blog/...
4
votes
4answers
2k views

How to set one path alias as the canonical alias?

I use the Tags taxonomy on several of my content types. In order to assist with a site-wide filtering mechanism, I'd like to be able to create additional path aliases for each piece of content. For ...
4
votes
1answer
234 views

OG homepage URL

My current/default group front page is groupname/node/nid But this is quite ugly, and when clicking on the site title the user is redirected to /group which does not display the group node but only ...
4
votes
2answers
132 views

URL aliases and bidirectionality

I have responsibility for a number of Drupal 6 and Drupal 7 sites and I'm curious about a difference I've noted among them. URL aliasing is enabled on all of the sites, so that a user who navigates ...
4
votes
1answer
2k views

How to programmatically uncheck 'Generate automatic URL alias' option for all nodes

I've created some nodes programmatically and set the path alias. But when I then go into edit the node the 'Generate automatic URL alias' option is still checked, even though my alias is shown in the '...
4
votes
2answers
1k views

Setting up regex-style rewrite rules within Drupal?

I have a couple of legacy rewrite rule redirects that I've traditionally put in .htaccess. For instance, paths are of the format: story/[story:title] And paths like: story/[story:nid] redirect to ...
4
votes
3answers
3k views

Aliases for user profile URLs

For example, the URL http://example.com/user/20/edit/cocktail?destination=user%2F20 leads to a page with the form to add content. I want to create an alias like bartender/add/cocktail, or (if ...
4
votes
1answer
400 views

How do I programmatically update pathauto paths for an entity?

If an entity has opted into auto generated paths, you could simply re-save the entity. However saving an entity is particularly inefficient, and the path/routing system runs outside of the entity ...
4
votes
2answers
552 views

How can I show the user login block on the 403 page?

With D8, I have a node (content type: basic page) that I use as a custom 403 (access denied) page. I set this as the custom 403 page on: /admin/config/system/site-information. The path is /node/21, ...
4
votes
1answer
371 views

How to return all aliases for a path?

I'm aware of this question Find all aliases for a given node - but this appears to be for 7, and I'm looking for a solution for 8. I'm also aware of the AliasStorage and AliasManager classes, which ...
4
votes
2answers
3k views

Routing and path aliases

I have created a module with its routing.yml file. mymodule.dossier: path: '/dossiers/{node}/dossier' defaults: _entity_view: 'node.dossier_dossier' requirements: _permission: 'access ...
4
votes
1answer
2k views

How to automatically generate multiple aliases for one node?

I'm using Drupal 7.22. I'm running four site versions in same Drupal installation. eg:- example.com/site1 example.com/site1 and its mobile versions: example.com/mobilesite1 example.com/...
4
votes
2answers
2k views

How to change all hyperlinks in the content

Hi i am new to the drupal and i got problem in my site in the hyperlinks. I have book copy module by which i have created one copy of the book. After creating the book i set aliases to content/newbook ...
4
votes
1answer
1k views

How can I specify the URL alias when importing nodes into Drupal 7 (with the Feeds module)?

I'm importing a site into Drupal 7, using the Feeds module. I don't see any way to specify the URL alias for each node (which I want to control on most every page). How can I do this? (If the Feeds ...
4
votes
2answers
665 views

URL Aliases not recognizing Node Reference Tokens?

I'm having trouble getting my URL Aliases to cooperate with certain Tokens... specifically Tokens generated by the CCK Node Reference module. Here is the URL structure that I'm trying to establish: /...
4
votes
1answer
648 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, ...
4
votes
1answer
641 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 ...
3
votes
5answers
6k views

Rebuild all paths for a content type

I want to change all paths for a given content type. For example is would change all node of type "image" that are currently at /[some_token]/[nid] to /photo/[nid] I am using path auto and I ...
3
votes
1answer
3k views

Tokens for taxonomy term parents in Pathauto

I am trying to find the correct tokens to use for a Pathauto pattern in Drupal 8. In Drupal 7, I have a Pathauto module pattern that creates a URL alias with a node's term and parent term. So if the ...
3
votes
2answers
2k views

Redirect all subpages back to the front page

I am trying to redirect everything that is under example.com/pictures back to the front page (i.e. I am hiding picture nodes to be directly viewable). Neither the Pathauto module nor the Global ...
3
votes
3answers
852 views

How to generate URL alias without %20 in URL?

We have a custom field that is being used to generate the URL alias. One issue we have found is that when we set the page to "Autogenerate URL Alias" and set the URL pattern to "[node:...
3
votes
1answer
4k views

Getting the first URL alias for a node in a SQL query

For some backups and exports, I need to fetch the URL-aliases for each node in SQL. The url_alias taqble, however, has no foreign key to the node table (nid) nor the other way around, it seems. Is ...
3
votes
1answer
4k views

How to disable/turn off Automatic URL alias

Could anyone suggest how to disable/turn off automatic URL aliases?
3
votes
1answer
2k views

Cleaning up the node edit URL

Say I have node/111/edit, and that node's path is my-node. I want the edit page to be at my-node/edit, instead of node/nid/edit. Is there an existing solution for cleaning up the node edit URL, e.g. ...
3
votes
1answer
841 views

How do I get Path Auto to display one value in the URL structure when node:field has multiple values?

Using path auto to create a url structure, I would like the following: my-content-type/[node:field_restaurant_category] Note that node:field_restaurant_category can have multiple values, and in my ...
3
votes
2answers
1k views

Create a general rewrite rule in .htaccess [closed]

In an upgrade scenario I have to provide some alias URLs like www.server.com/reading_23.html that should actually deliver www.server.com/reading/23. I spent lots of hours trying to make that work by ...
3
votes
2answers
1k views

How to make conditional path aliases?

In Drupal 8 you can create path aliases by going to: admin/config/search/path/patterns/add Which allows me to, for example, say that all content of type "blog_post" can have something like this: /...
3
votes
2answers
1k views

How to use the language neutral url alias pattern in pathauto?

I want to use the following patterns in pathauto: myCT All languages: pattern1 myCT neutral language: pattern2 myCT EN language: pattern2 So that all neutral (UND) and EN nodes of myCT have ...
3
votes
1answer
6k views

Programmatically create alias using pathauto for node

Developing a site that allows users to post images (node type = my_image) to a specific category. Basically, we create the categories and users submit images to them. Users do not have menu or url ...
3
votes
1answer
830 views

How to change the url alias after a username change?

I'm using pathauto to username paths (/member/[username]). After changing a username the url alias doesn't change and the user edit page doesn't have an option to change it manually. Is it possible ...
3
votes
1answer
7k views

Get node url alias/path when loading the node using node_load()

Does the node_load() does not return the node url alias in the node object or am I missing something. I know one way of getting the url alias/path is using the drupal_get_path_alias("node/NODE_ID"), ...
3
votes
2answers
1k views

How to rewrite link to taxonomy term in Views when using Pathauto?

The default language of my site is English. Taxonomy terms are translated using Entity Translation. I have created a view that uses aggregation to show Japanese terms (name provided by the Title ...
3
votes
3answers
2k views

How to alias pages generated by panels (node edit or view pages)

I have a panel page that is in the form: "/productsByMfg/%nid" where nid is the node id of the a manufacturer. This is not a node edit or view page since I already have that. I have about 100 of ...
3
votes
1answer
2k views

How to create a path alias with a query string in the target?

I want to link /myownstuff to /stuff?owner=myself It should at least be possible to do with some module, and with httpd-level configuration, but I don't know how to achieve either of them.
3
votes
1answer
305 views

What happens to URL alias when a node is unpublished?

We have many pages where we set "Generate automatic URL alias" to true and false. Then we will eventually unpublish some of the pages. Looking at Webmaster tools, we have found the URLs are still ...
3
votes
1answer
2k views

Drupal 8 does not create path alias' valid for all languages

I have a Drupal 8 multi lingual site setup using the module Pathauto to generate path alias for taxonomy terms. The alias are created form the name of the tags, which are not translated but rather are ...
3
votes
1answer
6k views

Redirect node/id to node/path-auto-alias

Using Drupal 8 I need to set various links between my content types and so far I'm setting the link using their path-auto-generated-alias, but that's terrible practice because if I change the pattern ...
3
votes
3answers
3k views

How to translate the URL alias (path) for an English version to an Arabic version?

I have a dual language site (English and Arabic). In the English version I added a URL alias: projects/commercial. But I can't find a way to have that translated to the Arabic version. I need that ...
3
votes
1answer
3k views

Url aliases for Drupal 7 Views page

I have a view which has the path set to events/%, where the wildcard will the the nid of, for example, a department. The view will display all events for a particular department. I want to be able to ...
3
votes
1answer
2k views

How do I pass parameters to the URL?

I want to pass parameters to the URL. With node/1/param1/param2, it works. If node/1 has the contenu/accueil path alias, contenu/accueil/param1/param2 returns a 404 error. How do I pass parameters to ...

1
2
3 4 5
16