Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hey there -
I've tested this in both 2.0-rc1 and 2.0-dev, I'm having the same problem in both.
I'm trying to set the root of the breadcrumb to an external URL. I've entered the URL as "http://www.blahblah.com/stuff" and instead of it going to the URL, it interprets it as a Drupal URL after chopping off the http://. So, it turns into "http://www.my.site/www.blahblah.com/stuff".
I read a post that says that external URLs should work, so I've categorized this as a bug report. Even though it might be a feature request. :)
Thanks!
Comment | File | Size | Author |
---|---|---|---|
#8 | custom_breadcrumbs-add-support-for-external-urls-1154608-8.patch | 2.49 KB | genjohnson |
#7 | add_support_for_external_urls-1154608-7.patch | 3.06 KB | colan |
#5 | custom_breadcrumbs_external.zip | 1.46 KB | martysteer |
Comments
Comment #1
Mirabuck CreditAttribution: Mirabuck commentedHello,
I needed this feature as well (our multisite install points to a central site at the top of breadcrumbs).
I created a small module and used hook_cb_identifier_list() and hook_cb_identifier_values() to look at adding this functionality. I'm finding though that external URLs coming into hook_cb_identifier_values() via $obj have a / missing so that they're rendered as http:/www.mylink.something. I wondered if it might be related.
Many thanks!
Comment #2
MGN CreditAttribution: MGN commentedCustom breadcrumbs assumes the paths are internal drupal paths by design. I think the identifier approach that Mirabuck is describing would work well for this.
@Mirabuck, if you would like to post your code, I would be happy to look it over and consider integrating it into the cb_identifiers module if there is interest.
Comment #3
Mirabuck CreditAttribution: Mirabuck commentedHi MGN,
There isn't much to it, but here it is:
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedsubscribe
Comment #5
martysteer CreditAttribution: martysteer commentedHere is a drop in module based on Mirabuck's code. Works pretty well as far as I can tell.
Comment #6
bobojo CreditAttribution: bobojo commentedAny chance of getting this working in Drupal 7? I don't have an external url, but the url token I'm using is giving an absolute URL instead of just the local Drupal path, and I have no way of getting just the Drupal path to show up in the breadcrumb.
EDIT: It looks like the drop-in module is already for Drupal 7, even though this issue was brought up in the Drupal 6 version. Also, the 7.2 version supports book hierarchy already, so I didn't need this module. I guess this post was just pointless after all!
Comment #7
colanPutting this in proper patch format for review.
Comment #8
genjohnson CreditAttribution: genjohnson commentedTrying to apply the patch in #7 I got the error "corrupt patch at line 72". I've re-created the patch.
Comment #9
Summit CreditAttribution: Summit as a volunteer commentedHi,
Will with this patch it be possible to add my http://www.mysite.com/ to every breadcrumb?
greetings, Martijn