When url have a variable value, i can't remove this. For example : user/6 user/7 ...

Replace exclude code :

// If this segment is configured to be excluded.
if (isset($excluded_paths_arr[$segment_url])) {
  continue;
}

By :

// If this segment is configured to be excluded.
foreach($excluded_paths_arr as $path){
  if($segment_url == $path || preg_match('`^'.$path.'$`', $segment_url) )
    continue 2;
}

Sorry for my very bad english

Comments

sonemonu’s picture

Status: Active » Closed (works as designed)

Hey,

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.

zedzed’s picture

Hello,

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.

sonemonu’s picture

In 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

zedzed’s picture

Path 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

zedzed’s picture

Sorry 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

chrisroditis’s picture

Same 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?

sonemonu’s picture

Assigned: Unassigned » sonemonu

This 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.

jessehs’s picture

Title: Use regular expression in excluded paths » Support Subpathauto module
Version: 7.x-1.16 » 7.x-2.9
Assigned: sonemonu » Unassigned
Issue summary: View changes
Status: Closed (works as designed) » Needs review
StatusFileSize
new1.42 KB

This 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.

greg boggs’s picture

StatusFileSize
new987 bytes

Roger,

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

greg boggs’s picture

Status: Needs review » Reviewed & tested by the community
Yaron Tal’s picture

I 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?

greg boggs’s picture

Hi Yaron,

Absolutely, or you can just create a patch with your module needs in it here and I'll include it.

~Greg

Yaron Tal’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new1015 bytes

I 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.

greg boggs’s picture

Looks good. Thanks!

jefuri’s picture

StatusFileSize
new794 bytes

Problem is not using the url() instead of the drupal_get_alias method.
url() method already implements url inbound and outbound alters.

rajat42059’s picture

Title: Support Subpathauto module » node displaying in breadcrumb Edit mode
Priority: Normal » Critical
Issue tags: +easybreadcrumb

Hi ,
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

tatarbj’s picture

Title: node displaying in breadcrumb Edit mode » Support Subpathauto module
Version: 7.x-2.9 » 7.x-2.12
Priority: Critical » Normal
Issue tags: -easybreadcrumb

Changing 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.

tatarbj’s picture

Version: 7.x-2.12 » 7.x-2.x-dev
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new977 bytes

As 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.

  • tatarbj committed 957beb2 on 7.x-2.x
    Issue #1758526 by Greg Boggs, Yaron Tal, tatarbj, jessehs, jefuri:...
  • Greg Boggs authored fc295fb on 7.x-2.x
    Merge pull request #1 from tatarbj/7.x-2.x-1758526
    
    Issue #1758526 by...
tatarbj’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.