Closed (fixed)
Project:
Easy Breadcrumb
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
27 Aug 2012 at 08:56 UTC
Updated:
25 Jul 2017 at 15:00 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
sonemonu commentedHey,
For excluding the number segment from a URL like "user/7", this module already provides an option for that, such option is named "Include the current page's title as a segment in the breadcrumb"; just untick it and the "7" (number) will not appear in your breadcrumb.
Comment #2
zedzed commentedHello,
It's not that. If i have some pages like "/user/1/track", "/user/1/article", i want remove only user number. Actually, i think i can't do that; with regular expression I can.
In fact, the best solution for me, it's an option to replace uid by name. I search for that and probably i create new feature request.
Comment #3
sonemonu commentedIn fact, the best solution for me, it's an option to replace uid by name
That's just as Easy Breadcrumb is intended to work, but first, you will need to create friendly URLs for your users, of course, you would use pathauto for that. These friendly URLs can be automatically generated by pathauto (using tokens).
Then for example, if you generate alias for your URLs in the following way (using pathauto):
FROM "/user/1/track" TO "user/admin/track"
Easy Breadcrumb would then generate breadcrumbs like the following:
User >> Admin >> Track
Comment #4
zedzed commentedPath auto can't make this url (user/uname/track , poll/pollname/result ...)
view this thread : http://drupal.org/node/1599960
SubPathauto work fine (http://drupal.org/project/subpathauto) but EasyBreadcrumb not work.
I have in url : /poll/poll-title/results
But in breadcrumb : Node >> 30 >> Poll-title
Comment #5
zedzed commentedSorry for my last post./poll page doesn't exist (in fact path name is "sondage"), if i create views for this page, all it's ok.
not working :/
I search why
Comment #6
chrisroditis commentedSame problem here, I use subpathauto to automatically create aliases for paths like "node/2/reviews" to turn into "cars/bmw/reviews" but the breadcrumb displays as "home >> node >> 2". The page node/%/reviews is a View page, btw.
Any ideas what's causing this?
Comment #7
sonemonu commentedThis module uses the "standard" Drupal's function 'drupal_get_path_alias()', which performs a SELECT from the DB table 'url_alias' for obtaining the alias of the current URL; it seems the module 'subpathauto' is not storing the alias in the "Drupal" way.
Comment #8
jessehsThis patch checks to see if the subpathauto module is enabled, and then checks to see if this path is modified by subpathauto and uses that alias instead.
This is necessary because subpathauto is not invoked when the drupal_get_path_alias() function is called.
Edit: this patch is rolled against 7.x-2.9, but it can be re-rolled against 7.x-2.x HEAD. That just happened to be broken for my site when I briefly tried it.
Comment #9
greg boggsRoger,
I've replicated the issue and tested this patch against the issue. Here's a re-roll against 7.x-2.12. Please credit Jesshs rather than myself with the work.
~G
Comment #10
greg boggsComment #11
Yaron Tal commentedI need this functionality for a custom module that does kindof the same as subpathauto does. Is it possible to implement this using an alter hook or something like that? Or maybe add a drupal_alter() after this?
Comment #12
greg boggsHi Yaron,
Absolutely, or you can just create a patch with your module needs in it here and I'll include it.
~Greg
Comment #13
Yaron Tal commentedI created a new patch that calls url_outbound_alter, this should fix the subpathauto issues and also work with any other module that alters outbound urls.
I based the patch on the 7.x-2.x branch, but I can't select 7.x-2.x-dev as a version here, so leaving it on 7.x-2.9 for now.
Comment #14
greg boggsLooks good. Thanks!
Comment #15
jefuri commentedProblem is not using the url() instead of the drupal_get_alias method.
url() method already implements url inbound and outbound alters.
Comment #16
rajat42059 commentedHi ,
I have installed the breadcrumb but when I am editing something,the breadcrumb is not being generated properly.and also full path is not being generated.
It is with all edit and add case.
Ex-Home / Node / test @ 2 / Edit Survey test @ 2.
Please help
Comment #17
tatarbjChanging it back to the original topic of the issue.
Patch#13 works great, but i would suggest to user current_path() instead of asking $_GET['q'] to make it a bit more drupal-ish :) (current_path returns it back purely, but still if in the future something gets discovered, module doesn't need to maintain it by itself, just rely on drupal core.
There is a patch that changes only this, but could be the ultimate solution to allow url_outbounding - and it's made on 7.x-2.12 version.
@Jefuri the reason why personally i think usage of url() is less prefered to solve the original need, is the fact it extends the functionality more than that is needed for supporting subpathauto - but definitely it's a nice catch!
Cheers,
Balazs.
Comment #18
tatarbjAs patch#13 got checked by two of us, i've chosen that one to rollback to the current 7.x-2.x, posting now the patch on it, that will be included to the next release.
Thanks everyone for the contribution!
Cheers,
Balazs.
Comment #20
tatarbj