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].
839
questions
1
vote
3
answers
1k
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
1
answer
1k
views
Get URL path or node.id in views fields replacement pattern
I need to rewrite my view fields like:
<a href="{{ path }}">
<div class="card-header">
<h3 class="card-title">
{{ title }}
</h3>
</div>
</a>
But ...
0
votes
0
answers
27
views
Re-write URL path before it appears to the user
I have a node with path my-awesome-node. Whenever I am accessing that node I am redirecting to a fixed path via hook_preprocess_page().
As a next step I also want to overwrite the path in the browser ...
1
vote
0
answers
31
views
Pathauto URL allowing unauthorised user to view
I have a content type that only authorised users are able to view i.e. mysite.net/node/66 (Access denied message for non authorised users) but when I view the same content using an alias of node/66 i....
3
votes
1
answer
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 ...
1
vote
1
answer
54
views
How do I reset URL for Product Display when replacing the main product? (instead of having an increment added to the URL)
I am having trouble with URLs after replacing items by a delete/re-import. The site uses Pathauto module.
I am adding content to a Drupal Commerce site using Feeds. I had uploaded the Product ...
3
votes
2
answers
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 ...
1
vote
2
answers
438
views
Pathauto tokens for taxonomy terms except root
Thanks to the Pathauto module and tokens, it is very easy to generate URLs with [node:field_product_category:entity:parents:join-path]/[node:field_product_category:entity]/[node:title], but I would ...
1
vote
2
answers
346
views
Drupal custom page with wildcards in url not working
I have created a custom page at admin/structure/pages and have set the path to be
course-details/%id/%name
My intention is that there will be a custom block appearing on this page and the id and ...
2
votes
1
answer
71
views
Drupal Page Process
Help me understand the best practice on how basic site building should work in Drupal 8.
Say I have a section on a website that is all about teaching. I'm going to create a basic page content type ...
2
votes
1
answer
2k
views
Remove "index.php" from upgraded paths
I've managed to upgrade a D7 site to D8 on localhost but I don't seem to be able to get rid of a superfluous 'index.php/' string appearing in all paths, both old and newly generated, eg:
/localhost/...
3
votes
1
answer
4k
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 ...
0
votes
1
answer
219
views
Google indexes the page using the domain alias
I have a Drupal 8 page which is indexed from Google without any error. The front page is a node configured as a front page in the Basic site settings (admin/config/system/site-information) using the ...
0
votes
0
answers
753
views
How to load page content by url programmatically
My custom module needs content of a page generated by another custom module. Please note I am not trying to pull a node content, so my question is different than one on How to load page content by url ...
1
vote
1
answer
263
views
Path is not available in Views filter criteria
I am creating a views with for node having fields Title,Author,Created,Path(page url). Now how can I add exposed filter for path(page url) so that user can find the specific page content in list.
...
1
vote
3
answers
880
views
Internal links aren't getting aliased
When saving an internal link to content (within the wysiwyg editor), the paths don't get aliased like they do with D7.
If I have a node (at path /node/10), with an alias of /some/other/path, when ...
-2
votes
1
answer
36
views
Show Taxonomy with all terms in article url
i want to show http://example.com/category/subcategory-1/subcategory-2/title of article format for any article.
I have used Pathauto module but unable to configure as desired.
0
votes
1
answer
100
views
Stopping 404 pages when adding get variable to the URL
I have a Drupal 8 website with a URL like http://mywebsite.com/my-content-url/my-content-url. What I have done is adding a variable to the URL, making it like http://mywebsite.com/my-content-url/my-...
1
vote
2
answers
726
views
How do I make an auto-increment field based on another field with Computed Field and Node Clone modules working together?
I have a Computed field to calculate a value (if another field has value A, count nodes with the same value, add 1 and then use the result for the computed field value, auto-increment-like). This ...
0
votes
1
answer
179
views
How to render URL ALIAS field on form?
Is there a way to render the URL Alias field on the form separately from the print drupal_render_children($form);?
My plan is to render the URL Alias field on top of the form neatly (before the other ...
1
vote
0
answers
294
views
How Does Pathauto for Drupal 8.x Determine Generate URL Status?
I would like to turn off the "Generate Automatic URL Alias" for all existing content in my Drupal 8 instance. How do I do that? According to this thread D7 used a table: pathauto_state. From what I ...
1
vote
0
answers
36
views
figuring out menu token path for file field
I'm trying to use menu token and file (field) path to get a path to display a node's PDF field from a menu link.
I tried with the tokens:
[node:field_pdf]/[file:url]
with and without relative path ...
1
vote
4
answers
75
views
Unable to access admin
I am trying to access the admin of my Drupal site but .../admin and .../user are not working.
When I try to access those pages I get the 404 page.
I believe this may have been redirected similar to ...
3
votes
3
answers
3k
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
0
answers
42
views
pathauto with drupal 8 and generated characters
I am using pathauto with drupal 8 but i want to change the way it translates-generates some characters from greek to english. For example the greek character Η is translated as "e" . How can it be ...
0
votes
1
answer
355
views
How to create path for taxonomy term pages with parent terms if they exist
I have a taxonomy vocabulary which will only ever contain 2 level deep hierarchy.
I need the url to be just [vocabulary]/[term] for any parent term.
But for a child term I need it to be the ...
1
vote
4
answers
3k
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 ...
4
votes
1
answer
8k
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 ...
8
votes
5
answers
8k
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?
0
votes
1
answer
170
views
How can I create a path auto pattern token based on a menu path without placing node in menu?
Here is the scenario:
We have a D7 multisite set up with an installation profile that we created so that all sites are basically managed with the same rules. But we do allow some flexibility... So we ...
0
votes
1
answer
343
views
Update node alias while retaining the old alias
I want to update many of my node's aliases. I have seen many questions here at Drupal Answers, but nothing I can use, as far as I can see.
What I want to do: I want to update a big portion of URLs (...
0
votes
1
answer
96
views
Variable in base path
I need to change the BasePath in drupal 8 of all views and all node in such a way that it contains a variable (which will manage as country)
Like this:
site.locl/{lang}/{variable}
site.locl/en/...
0
votes
1
answer
299
views
How to have a proper breadcrumb path
I have a problem with my breadcrumb path on my drupal 7 installation. I am using URL-Alias (Module: pathauto) and have a "blog" content type.
Now the view with all blog entries in the URL is on /blogs/...
0
votes
1
answer
330
views
Create token with translatable variable in pathauto
I would like to be able to create my own tokens for pathauto. In D7 I was able to create with the variable module some variables to represent a portion of an url. These variables where available as ...
0
votes
2
answers
34
views
Bulk assign paths to nodes
I have a bespoke content type with a lot of nodes, but alias urls have not been assigned to them. I need to bulk assign them consistent alias. I know on Drupal 7 this is possible to do using pathauto, ...
0
votes
2
answers
337
views
How to use/show different path alias of same URL according to user roles?
Hi I have set URL alias of for node add from path like below :
node/add/my_content_type = addlink
node/add/my_content_type = suggestion
When user is logged-in we make access of node add ...
0
votes
1
answer
1k
views
How to change the default term path "taxonomy/term/[tid]" [duplicate]
Am using drupal 7 for my project.
Here am facing for custom url change.
My website url is www.example.com/plans/1. Above url need to change as www.example.com/plan-name.
Pls suggest to me to fix ...
0
votes
1
answer
58
views
Import legacy site URLs via url_alias table
I have a long table of legacy site URLs (Drupal 6 site) and the new URLs they should redirect to on the new site (Drupal 8). The list is too long to make this an .htaccess fix, and too irregular for ...
1
vote
1
answer
1k
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, $...
2
votes
1
answer
1k
views
Twig template suggestions for paths such as page--node--page-url
using D8, I'd like a twig template for a page I've created based off the path of the page and not node %. I look in my twig suggestions and all I see are:
page--node--8.html.twig
page--node--%.html....
1
vote
0
answers
2k
views
Pathauto aliases won't generate for custom entity types
I have a custom content entity type, mymodule, which currently generates paths like /mymodule/{entity_ID}/ on creation.
My entity has a title field defined programmatically in my baseFieldDefinitions(...
3
votes
2
answers
2k
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:
/...
0
votes
1
answer
509
views
How to prevent duplicate URL patterns and not have "-#" appended to the URL alias?
We have a situation where we need to prevent the same URL from being generated within the same language.
Current situation (all for en):
Create nodeA with a URL alias of "page/node-title"
Create ...
0
votes
1
answer
219
views
how to remove all slashes from all path aliases
After I import data to my site, the url aliases have / at the end, when I visit that Url alias I faced with page not found, I tried to edit one of them manually and when I removed the slash from end ...
0
votes
1
answer
36
views
enforce naming conventions for page aliases by content type
I would like to set mandatory url naming conventions for custom content type nodes.
When users create a new content type I want to force certain naming conventions for the url alias. For example:
...
1
vote
1
answer
104
views
URL alias to call function
in short I want the same functionality as the taxonomy module where you can have an URL like "localhost/drupal/admin/structure/taxonomy/occupational_fields/edit"
where occupational_fields was the ...
2
votes
1
answer
263
views
URL alias in page.tpl.php
I try to make link 'Mobile version' on site page site.com/page. This link leads to this page but on subdomain m.site.com/page.
I use page.tpl.php. I try to write this.
<a href="http://m.site.com/&...
1
vote
2
answers
178
views
Pathauto and Token to get the first child term
I am trying to create URL path aliases patterns with Tokens and Pathauto.
My main issue is how to I get the child of a parent of a taxonomy term? So my url is something like this.
[child-term:name]/[...
1
vote
2
answers
588
views
How to find and remove string in front of URL? [closed]
We have a url pattern of [node:menu-link:parents:join-path]/[node:title].
We are finding that it is resulting in the following urls and we wanted to see if we could use hook_pathauto_alias_alter to ...
0
votes
1
answer
185
views
Configuring/using Drupal Pathauto module [closed]
I am new to Drupal. I just installed Drupal 8 and pathauto module.
Now I need to configure path patterns or whatever they are called.
On page https://www.drupal.org/documentation/modules/pathauto ...