I've made some modifications to Custom Breadcrumbs to allow for a little more customization. This was motivated by the need to produce custom breadcrumbs for views. The new features offered with this patch includes

  1. custom breadcrumbs for views page displays.
  2. custom breadcrumbs based on path alias.

As a side affect from 2, you can also specify multiple breadcrumbs for a single node. The breadcrumb that is displayed will depend on the path requested.

What's been changed:

  1. The admin interface is only slightly modified. The only addition is a new entry in the node-type drop down list called "match_path" (This is a hack forced to fit with the existing form, it can easily be improved later). If you create a custom breadcrumb of type "match_path" then
    1. The first line of the titles textarea on the add form will be used to name the custom breadcrumb (as it appears in the list of custom breadcrumbs).
    2. The first line of the paths textarea on the add form should be a drupal path (i.e. node/123 or my/path/to/content ) to apply the bread crumb to
    3. The remaining lines of the titles and paths textareas should be constructed in the normal way for the custom breadcrumbs module (documentation at http://drupal.org/node/228955)
    4. Note: otherwise preserves standard process for adding custom_breadcrumbs based on node type, so if you don't want to use these new features, you don't have to do anything different

Example: Here is what I do to set up a custom breadcrumb Home >> MGN's New Breadcrumb for a view's page display with path of some/path. In this simple example, the breadcrumb will be linked to path some/link and the new breadcrumb entry will appear in the admins custom breadcrumb list with name labelxyz.

Node-type:  match_path

Titles:
labelxyz
MGN's New Breadcrumb

Paths:
some/path
some/link   

Some technical details: This patch

  1. Adds custom_breadcrumbs_menu_alter() to redirect page callbacks so that custom_breadcrumbs has the opportunity to insert a breadcrumb prior to an established page callback. If an existing callback path matches the custom_breadcrumb path (described above), then the page callback function is changed to _custom_breadcrumbs_menu_redirect(), with the original callback function and paths stored as additional page arguments. When the menu system gets a request for a path that should have a custom_breadcrumb, the menu_redirect function adds the custom_breadcrumb, then calls the original page callback function with the original arguments. [To make this work, custom_breadcrumbs has to have a system weight higher than any module (like views), so I've added an update function to increase the system weight.]
  2. Changes custom_breadcrumbs_nodeapi slightly to first check to see if a custom breadcrumb has been specified based on path. If so, that breadcrumb is used, otherwise checks and delivers breadcrumb based on node type, if available.

In addition, the path rolls in some of the other recent patches/requests that have been submitted but not committed.

http://drupal.org/node/289810 : special behaviors cleans the path using pathauto rules
http://drupal.org/node/296166 : visibility patch
http://drupal.org/node/318272 : decode_entities to allow quotes in titles

Apologies for combining issues here, but these are all working well for me and I made my changes on the 6.x-1.3 version with these patches already applied. I can separate these out if there is objection to them since they are not relevant to this proposed extension. I also see that 6.x-1.4 is now released, so if there is interest I can also submit a patch based on 6.x-1.4.

Comments

MGN’s picture

Version: 6.x-1.3 » 6.x-1.4
StatusFileSize
new16.38 KB

Here is the patch against 6.x-1.4

toddwoof’s picture

Hi. I'm using the 6.x-1.4 version with the patch in #1. Drupal 6.5.

* It works for some fixed page, say a page with clean url "test-page." But:

* If I enter the view-name/argument for some views page, it doesn't work. Say, I have a view "my-view" with a taxonomy term argument. If I enter the path to some view page -- like "my-view/some-taxonomy-term", it generates no breadcrumb
on that view page. Same thing with a wildcard in the path: "my-view/*" generates no breadcrumb.

* If I enter just the view name and not an argument or wildcard, it white-screens the view page. Say, "my-view".

Is this set only to work on a view page that doesn't have an argument? Or, am I doing something wrong?

MGN’s picture

Status: Needs review » Needs work

Thanks for testing it. I haven't added anything to match against wildcards yet - the path matching is on the absolute path. I think I see how to fix this now. I'll post a new patch when this is fixed.

adaven’s picture

subscribing

MGN’s picture

StatusFileSize
new20.69 KB

O.k. Here is a revised patch that should allow custom breadcrumbs for views displays (with or without arguments) as well as for individual nodes by path. Still no changes to the table structure, but there are a couple of improvements that will make it easier to select a view that custom breadcrumbs can be applied to.

  • When you go to add a custom breadcrumb, with this patch you will see all the enabled Views pages with the path as View::path/to/%/view in the select list (the % shows up if the views page has an argument - nothing you have to worry about). So far I've only tested it with views pages with single arguments, but I think it will work with more than one argument - let me know if you find otherwise and I'll look into it. After you have selected the View that you want a custom breadcrumb for, fill in the titles and paths section as you would for any other node type. (i.e. ignore the above example for views breadcrumbs).
  • To add a custom breadcrumb for a node at a specific path (wildcards won't work here), select Specify Path [previously it was match_path. I changed this to avoid possible conflicts with node types. the names for node types cannot have spaces so there should be no possibility for confusion or conflict now]. Then fill the paths and titles as shown in the example above. Right now there is no check to see if any of the paths that you provide are valid.

If all goes well you should have custom breadcrumbs for views pages and for nodes by path alias. If you tried the patch in #2, it would be best to delete any match_path breadcrumbs you created with it before you try this patch. This patch is against 6.x.1.4.

Let you know what you think. It would be nice if an experienced developer took a look at the code and let me know if this is a reasonable approach or not or if there is a better way of accomplishing the same end. All I can say is that it seems to work on my site, and I am happy to have breadcrumbs for views pages!

Note: I am also using taxonomy breadcrumb because of the features offered by that module. Both modules seem to work well together.

toddwoof’s picture

This looks like progress! But it's not working for me. Symptoms:

* If I create a new custom breadcrumb, I can see the views listed (cool!), but those with arguments don't show the "%" as you describe.

* If I actually select the view and create a custom breadcrumb, it white-screens the view pages, and I have to turn the custom breadcrumb module off to get the view to work again.

MGN’s picture

Ok. Lets try to figure out what the difference is...

0. Did you remember to run update.php after enabling cb 6.x-1.4?
1. What version of views are you running? What version of PHP?
2. What is the error that gives the wsod? This would be really helpful in diagnosing the problem. Should be listed in the php error log (if you have error logging turned on) and/or in the Reports>>recent log entries. Also if after you get the white-screen you hit your browser back button, do you get any error messages printed (in red/pink) to the screen?
3. Go to your views list and find the paths for the views that lead to this problem. Tell me what they are, and what is actually shown in the select box....

Thanks

MGN’s picture

Status: Needs work » Needs review
StatusFileSize
new184.2 KB
new94.8 KB
new20.46 KB

Here is an updated patch that fixes some minor problems, mostly formatting (coder doesn't report any warnings anymore). I don't expect any of the changes would impact the problem described by toddwoof, which I can't reproduce on my servers.

I've installed this on two servers with Drupal 6.4 and 6.6 and different versions of views and other modules and it works fine for me on both. I've attached a couple of screen shots of the admin forms to give an illustration of how custom views breadcrumbs are listed on the form, and how the Titles and Paths are filled in. I would appreciate it if anyone who is interested in custom breadcrumbs for views displays and/or path-based breadcrumbs can test this out and let me know what you think.

Thanks

toddwoof’s picture

This is going to look unhelpful, I'm afraid:

* Yes, I ran update.php.
* Using PHP 5.2.6, Views 6.x-2.1
* No PHP error message logged, and no text on the page if I page back. In fact, there is no page source generated.
* View name is "archives-notes" (the name of my newsletter) and an example of a path that breaks is /archives-notes/SAN-Vol-4-No-10 (where SAN-Vol-4-No-10 is the taxonomy term).
* Shown in the select box is "View::archives-notes"

I wonder if I'm missing some obvious step...

MGN’s picture

Does the patch work correctly with other views, paths and node types? It would help to have a better description of the view that's giving the problem so I can set up one of my own to test it. Can you export the view (admin/build/views/export/archives-notes) and attach it as a text file so I can have a look? Thanks.

toddwoof’s picture

One quick, probably stupid, question: Does the patch in #8 incorporate the earlier patch changes? Or, better yet, could you post a current, patched version of the module? I tried running the latest patch, and the result created other error messages, so I want to be sure I have a properly updated version of the module. Then I can test various cases and send some views exports, without worrying about wasting your time. Thanks!

MGN’s picture

StatusFileSize
new14.71 KB
new20.51 KB

Ok. I think I found the problem. I was assuming that arguments passed to views had to be explicitly designated by % wildcards, but this seems to be optional -- The help text under views Page Settings > Path reads "You may use "%" in your URL to represent values that will be used for arguments." The patch was not properly handling any extra path elements, and since you did not explicitly designate the argument with % when you set up your view path, it broke. I found that I could also break it on my server by just including an extra path element on a view that didn't take any arguments.

This revised patch (cb-6.x-1.4-extensionsV4.diff against 6.x-1.4) fixes these problems. Please give it a try and let me know how it works. [I've also attached an already patched version of all the module files (cb-ext-patched-cb-6.x-1.4.tar_.gz), if that makes testing easier.]

toddwoof’s picture

That fixed it. Both the specific path and the views function work properly now. Thanks! This is an excellent addition to the module. I'll try on another site where I have a lot more views to set up, but everything looks good now.

jeremy_a’s picture

Subscribing.

I'd like to test this, but cb-ext-patched-cb-6.x-1.4.tar_.gz isn't working for me. The views come up in the UI, but no breadcrumbs at all on views pages.

I'm using Drupal 6.6 & Views 6.x-2.x-dev.

gilgabar’s picture

Same experience as #14 above. Allows me to select a view in the admin settings form, but makes no difference in the breadcrumb on the actual view page. Using Drupal 6.6 and Views 2.1.

MGN’s picture

@gilgabar and @jeremy_a

Did you run update.php after enabling the module?

You might want to check the weight for the custom_breadcrumbs and views modules in the system table of the database. For the patch to work, custom_breadcrumbs must have a greater weight than views (If hook_menu_alter of views is running after custom_breadcrumbs, it will override custom breadcrumbs for views). This is the most likely reason for the patch not working as expected. If its lower than views, just manually increase the custom_breadcrumbs weight in the system table.

Otherwise, are you getting expected results for custom breadcrumbs with nodes or paths?

jeremy_a’s picture

I fixed the issue by disabling the module, deleting all refs to it from the db, then reinstalling afresh.

Somehow it didn't like the first install tho I'm not quite sure why

Thanks

gilgabar’s picture

Ok, got it working now. You were correct about the weights. I had run update.php, cleared the cache, etc. but that didn't help. Manually changing the weight of the custom breadcrumb module to be greater than views did the trick though.

Thanks a bunch. Looks like a great addition to the module.

babbage’s picture

I have applied the patched version in #12 and [deleted].

EDIT: I've come back to edit this as I can not get this to work as described... My comment that was previously posted here was in relation to a different patch, which is working for me, but was accidentally posted here. D'oh.

abu3abdalla’s picture

working probably

Anonymous’s picture

I have installed this patch and it's working ok.

MGN’s picture

Thanks for the feedback. Its been working well for me, but let me know if you see anything that needs attention or can be improved. Happy to support it and develop further.

Anonymous’s picture

There is just a problem, token doesn't work with views: if I use [yyyy] the breadcrumb displays just [yyyy], there is a way to use the views argument in the path or title?

MGN’s picture

@jmesam: If I understand your goal, this can be done with a token patch (by colin_young) that is currently being reviewed at #273893: Argument tokens using arg(). This patch provides global tokens for url segments. So if you have a path like path/to/my/view, then the arg tokens will be assigned: [arg0] = path, [arg1] =to, [arg2]=my and [arg3]=view.

Example: Lets say you want a custom breadcrumb for a view that takes an argument like
path/to/%/view. When the url is path/to/jorge/view, and the breadcrumb title field is [arg2]'s world you would get the breadcrumb: Home > jorge's world.

Is this what you are trying to do? If so, the token patch should work for you. I just tried it on my site and it works fine.

Anonymous’s picture

That's what I meant. Thanks for your great explanation! I'll try the Token patch.

babbage’s picture

#24 looks like exactly what I've been looking for. Excellent! :)

abu3abdalla’s picture

this is my case would u please help me :) (( drupal 6.8 ))

i am using CB and views to manage the taxonomy/term/% ( default views page ) , i have many vocabs lets say VOC1 VOC2 VOC3 and lets say term1 and term2 and term3 for the VOC1 and term4 term5 term6 for the VOC2 and term7 term8 for the VOC3.

the problem is
i have create node lets say node/1 and its taged as term 1 so when i visit the node one the breadcrumbs must be as HOME >> VOC1 >> TERM1
and thats happend and great

now i have used CB with TOKEN to manage the taxonomy/term/% page breadcrumbs so i added custom breadcrumbs as

title : [vocab] , url: voc[vocab-id] WHERE I HAVE ADD PAGE USING VIEWS TO MANAGE THE TERMS FOR EVREY VOCAB WITH PATH FOR EACH VOCAB BY (( VOC# )) SO I HAVE THREE VIEWS PAGES

NOW, when i visit mysite.com/taxonomy/term/1 the breadcrumbs should be HOME >> VOC1 and also the path must be mysite.com/voc1

BUT , IT APPEAR AS HOME >> [VOCAB] AND THE PATH IS MYSITE.COM/VOC[VOCAB-ID]

I TRY THE TAXONOMY BREADCRUMBS FIRST BUT THE SAME PROBLEM ALL OF THEM SOLVE THE NODE BREADCRUMBS BUT NOT THE VIEWS PAGE

THANK U IN ADVANCE :)

MGN’s picture

Yeah, I understand the problem - it lands somewhere between where taxonomy breadcrumbs leaves off (works for taxonomy term pages, but doesn't handle views) and custom breadcrumbs (extended to handle views, but not taxonomy) begins. Merging the features of taxonomy breadcrumbs into custom breadcrumbs would make it possible. I've hesitated to do this, but given that taxonomy breadcrumbs doesn't seem to be supported anymore, its certainly worth considering.

I can look into doing this if there is interest, but it will probably have to wait a few weeks...

abu3abdalla’s picture

THANK YOU

i solved it,

i have used http://drupal.org/project/token_custom to manage it just creat a new token and its going well now i will write a toutorial for that.

thank u all .

okmi’s picture

sorry for the basic question, but i can't seem to find this information on drupal's site. is there a difference between a .diff and a .patch? if i simple cd over to /sites/all/modules/custom_breadcrumbs and run: patch < cb-6.x-1.4-extensionsV4.diff is that all i need?

MGN’s picture

Yes. That should to it as long is the patch resides in the cb directory. The documentation you are looking for is here: http://drupal.org/patch/background. You may also have to manually set the weight of the module so it is greater than views (see #18 and others above...) Of course, if you don't have any trouble and it works just as you would expect. Please share that as well! Hope this helps.

MGN’s picture

@dbabbage, so if I understand this correctly, you are saying the patch in #12 isn't working for you. Give me some details and I'll try to help....

mandclu’s picture

I'm using the module as provided in #12, and the Views support is great. I can't seem to get the Specify Path feature to work, though.

Any chance of panels support, too? (That's probably asking a lot, I know)

My issue is that I wanted taxonomy term pages with a lot more structure than is generally provided by taxonomy, so I set up a panel to handle the display of term info, tagged nodes segregated by type, etc. I'm having trouble getting the breadcrumb to the vocabulary page (also a view) to appear.

I thought maybe if I tried a path such as:
category/vocab-name/%

That doesn't seem to work, so for the sake of troubleshooting, I also tried:
category/vocab-name/term-name
taxonomy/term/1

In other words, trying a specific instance didn't do much good either. Is there something I'm doing wrong?

MGN’s picture

I would like to see if this can also be extended for panels, but I don't personally have much experience with that yet. I'll give it a try in January and see what can be done.

You are not doing anything wrong, custom breadcrumbs doesn't support taxonomy/term pages.

For taxonomy pages, I recommend using taxonomy breadcrumb and the patch at http://drupal.org/node/222636#comment-1075769. Taxonomy breadcrumbs isn't being maintained anymore, but I will be supporting it as well as I can. Taxonomy breadcrumbs handles all of my taxonomy pages well and plays nicely with custom breadcrumbs.

Let me know how you are working with Specify Path, and I'll see if I can troubleshoot. I'll be away for the next week or so, but will try to help out as soon as I can.

abu3abdalla’s picture

ok i have solved something like this before but i have to check the portal if that capable ? i need to help but i can understand the problem well so that
if u like just ping me throug any IM

mohdnashaat@msn.com
eng_abu3abdalla : skype
abu3abdalla@gmail.com

NOTE : free of charge just to support the community :)

mandclu’s picture

I'd be happy to help with panels support, if I can. Any suggestions on where to start?

mrfelton’s picture

Subscribing. I'd like to know if/when this patch will get committed. Thanks

barry’s picture

subscribing

MGN’s picture

Title: An attempt at extending custom_breadcrumbs for views and paths » Extending custom_breadcrumbs for views, paths, and panels

First we need to establish what kind of support we want for panels - I am afraid its more complicated than views...

Breadcrumbs for panel pages and panel nodes? Anything else?

Panel nodes can already be handled with the 'Specify Path' feature of the current patch - just specify the path to the node. I just tried that and it seems to work fine. Perhaps improving the interface to identify all nodes using panel displays would allow the admin to more easily use this feature. What are all the cases that we want to handle?

For panel pages, I think it will be much like views: identify all the menu items using the panels_page_render_handler added them as options to the admin form (designated with a Panel Page:: label?) so the admin can select a page and create a custom breadcrumb, and then modify the custom_breadcrumbs_menu_alter function for panel_pages to use the custom breadcrumbs page callback first before calling panels_page_render_handler...

How does this sound? What other use cases should I be considering?

Thanks for your help.

josys64’s picture

Hi,
i'm trying to make CB, views and token work together.
Drupal 6.9
CB 6.x-1.4 (patched like #12)
views 6.x-2.2
token 6.x-1.11 (patched like #24 )

i have a views named client_domain_list with 1 arg , so the path is for instance client_domain_list/6 and the Cb admin i got this :
Titles :
Domain
[field_domaine-title]

Paths:
domain_list
client_domain_list/[arg1-alias]

The field_domaine-title is a CCK node reference tokens.

So my problem is this token is not replaced by the value, the breadcrumb still look like that :

Domain > [field_domaine-title]

any ideas ?

josys64’s picture

Actually just Global tokens works.
Node tokens, CCK text tokens and CCK node reference tokens doesn't work.

MGN’s picture

Right. that makes sense since its a view not a node - the fields associated with any of the nodes haven't been loaded, so they aren't available for views. For views, you only have the global tokens (including the path, and path aliases). I suppose there are ways to think about grabbing the node object for one of the nodes that are being used to form the view, and using that to get the fields you are looking for, but it will take more development...

toddwoof’s picture

Just in case this helps anybody:

In one of my sites, to make custom breadcrumbs work with Specify Path and with Views:: (including views with multiple arguments) I had to do this:

1. In phpMyAdmin, go to the system table, and edit the record for custom_breadcrumbs to set the weight to be higher than the weight of Views. In this case, Views was set to 10, so I made the weight of custom_breadcrumbs 12.

2. In admin >> modules, turn off the custom_breadcrumbs module then turn it back on again.

Now, for Views I can enter the breadcrumb text in Titles and the path in Paths, and it works fine.

Also: I know this isn't a finished module, but a "nice to have" would be some kind of tweak to the UI for Specify Path entries. Right now you have to enter the CB name / CB label under Title and the specified path / CB link under Paths.

Maybe splitting these up into more fields, something like this (but, what do I know?)
* Name of this CB entry:
* Path to apply this to (if Specify Path):
* Text for custom breadcrumbs, one per line:
* Paths for custom breadcrumbs, one per line:

Anyway: Love the module. It does exactly what I need it to do. Thanks!

mrfelton’s picture

love it. Can't wait to see this committed.

jakew’s picture

subscribe!

notebene’s picture

subscribe

notebene’s picture

I got this patch to work for views, thank you.

The one unfortunate thing is 'Override menu path' doesn't seem to work on a view. I get an "Unsupported operand types" message for includes/common.inc on line 1542, which is the last line in this snippet of code (above my elipse):

function l($text, $path, $options = array()) {
  global $language;

  // Merge in defaults.
  $options += array(
      'attributes' => array(),
      'html' => FALSE,
    );
...

If I don't set 'override menu path', it works fine, but it doesn't open any parent menus to a specific path and make it active, which is something I'm able to do with Node Breadcrumbs, but not this.

As an alternative, since I'm inclined to want my breadcrumb to match my parent menu item, what I have been doing is setting the Page of my View to have a menu item, then I move that menu item to the parent I want, and disable the menu item. This will allow me to let Menu Breadcrumbs handle the breadcrumb, and at least have the it openned to the parent menu item, with the unfortunate side effect of not having the parent item selected (as would happen if I were able to leverage Node Breadcrumbs to handle Views).

What would wrap this all up (at least for me) would be to be able to have a menu item expanded an active for this breadcrumb.

bkildow’s picture

subscribe

UniqID’s picture

subscribing...

notabenem’s picture

MNG: will you please be so kind and update the patch against the latest DEV?

notabenem’s picture

Another thing:
The original _custom_breadcrumbs_load_for_type contained as argument $node.
The new function has several arguments, but none of them is $node. Hence, PHP snipppets evaluated in
$visibility = eval(trim($breadcrumb->visibility_php));
can't use the $node object.

I suggest changing the $type argument back to $node.

MGN’s picture

@notabenem, I am working up custom breadcrumbs 6.x.2.x which will have views (and other) support as submodules, so I am reluctant to fix up a new patch to 6.x.1.x-dev.

Thanks for the feedback on the the issue with $visibility. I hadn't thought about that, but see what you mean. I agree that you should have access to $node in setting the visibility for breadcrumb for node pages. I'll see what I can do to fix this is 2.x.

See #372648: Custom Breadcrumbs 2.x for details and to contribute ideas for what the next version should contain.

mrfelton’s picture

I'm using the patch at #12 and am able to generate breadcrumbs for basic views - nice. However, I am unable to get the 'specify path' option to work on a page generated from a view. I have a view that takes a taxonomy term as an argument and displays nodes that match certain criteria and have this taxonomy term assigned to them. For each taxonomy term, I create an alias to the view. I use this to create kind of 'landing pages', where the taxonomy terms are section of the site. So I might have:

/some/pretty/alias -> /landingpage/1column/123
/another_alias -> /landingpage/1column/55
/a/different/alias -> /landingpage/1column/165

So I have three different 'landing pages', created from the same view /landingpage/1column/[tid], accessible at three pretty aliases. I want to give each one of these aliases a custom breadcrumb, and am trying to do so using specify path but it just isn't working. This is what I'm putting in the cusomt breadcrumb settings after selecting the 'Specify path' option:

== Titles ==
Some Pretty Alias
Some
Pretty

== Paths ==
some/pretty/alias
some
some/pretty

What am I doing wrong?

MGN’s picture

Thanks for the feedback.

Specific path only works on node pages (via hook_nodeapi).

If /landingpage/1column/[tid] is the path to a view, then it should show up as /landingpage/1column/% in the list of views pages. You should then be able to set the breadcrumb for this view as you have done with other views.

If this is an alias to a taxonomy term page, it wont work. Instead, you can use the taxonomy_breadcrumb module to set the breadcrumb. I am currently working on bringing these together for custom breadcrumbs 2.

Hope this helps!

mrfelton’s picture

The alias is not to a taxonomy term page, the taxonomy is simply used to decide which nodes the view should be displaying, so I don't think taxonomy_breadcrumb will be of use.

The view actually shows up in the list as /landingpage/1column (no mention of %) - this is true for all my views, many of which take arguments. I am able to select the view::/landingpage/1column from the dropdown and successfully create a breadcrumb this way. However, this doesn't work the way I need it to. Take my use case again:

The view /landingpage/1column/[tid] is aliased several times (currently about 10 - one for each term in the taxonomy), each time with a completely individual path and breadcrumb.

/some/pretty/alias -> /landingpage/1column/123
/another_alias -> /landingpage/1column/55
/a/different/alias -> /landingpage/1column/165

each one of these needs it's own custom breadcrumb. Using the view::/landingpage/1column option from the dropdown gives me no way to give each path it's own breadcrumb.

MGN’s picture

Ok. Thanks for the detailed explanation - I get it now. I think the % isn't showing up because of the way you set up the view (its an optional placeholder), so that's not a big deal. For the views breadcrumbs, its really designed for one breadcrumb per view, so you really do need specify path, but for views pages. Unfortunately, the current patch can't give you the breadcrumbs you want. I'll see if there is a way getting this behavior into cb 2.0.

mrfelton’s picture

Ah, damn :(
I know all devs hate this (I know I do anyway)... but do you have any idea how long until we will see a v2? How's it's progress going?

babbage’s picture

@mrfelton—surely the answer is proportion to any donation you make to the developer. ;)

mrfelton’s picture

@dbabbage: Well, I'm more than happy to help out where I can. You have anything to test yet? Anything specific you would like to me to try and work on/out?

TimG1’s picture

subscribing

MGN’s picture

@mrfelton. I've just started a 6.x.2.x-dev branch with basic node and views support (similar to the patch above) as a submodule. You can test and suggest changes as you like, but be careful since you may be the first to do so! Definitely not intended for production, haven't had time to change the documentations, etc, etc but it works on my test site. Any feedback would be appreciated. I have a paths and basic api submodules ready to add, but wanted to think about your request in #55 to see if I can work that in before committing.

thepanz’s picture

Hi all, I'd like to let you know about my patch for Views (version 2.3) to support customizable breadcrumbs: #424464: CB for Views: let views create customizable breadcrumbs.

Regards

MGN’s picture

I just found a helpful views hook that will make it easier to insert custom breadcrumbs for views. The hook is hook_views_pre_view(), and it gives modules a chance to modify a view before it is executed. In this case we don't want to modify the view, but it gives an opportunity to set the breadcrumb for a view.

If panels pages have a similar hook, it will be pretty easy to do a custom_breadcrumbs_panels submodule.

I've added a custom_breadcrumbs_paths submodule to 6.x-2.x-dev which implements this hook as well as nodeapi to set the breadcrumb based on a specific path. This accomplishes what was done previously in the patch in #12. It should also handle the case described by mrfelton in #55.

I've also fixed the problem with $node being unable for setting breadcrumb visibility described by notebenem. For the views and paths submodules, it should be possible to make the view object available through php for setting breadcrumb visibility. I'll try to implement that.

thepanz’s picture

Hi, my patch for Views2 have been committed: #424460: Configurable Argument Breadcrumb, I don't know how it will work in multi-language sites or with prefix lang codes, AFAIK Views2 have a "transatable" (that i setted to TRUE for breadcrumb) setting... but it's still obscure to me how it works :|

Cheers

MGN’s picture

Title: Extending custom_breadcrumbs for views, paths, and panels » Extending custom_breadcrumbs panels

@thePanz: Great! I'll have to give it a try next time I upgrade views.

I am changing the title, since we have already worked in views and paths (and taxonomy). All that remains of this original issue is panels. It looks like panels2 is going to soon be dropped for panels3, and panels3 is still in beta....

Is it still worthwhile trying to extend custom breadcrumbs support for panels2?

thepanz’s picture

@MGN: I think it will be shipped in next 2.6 release :)

I read about CB and language-prefix issues (probably) fixed in CB 2.x: could you share your fixes? I mean: I didn't try Views2 breadcrumbs with lang-prefix, but the same issues could occur also in Views2..

Cheers

ps: shouldn't you move this issue to 2.x?

MGN’s picture

Title: Extending custom_breadcrumbs panels » Extending custom_breadcrumbs for views, paths, and panels
Status: Needs review » Fixed

The language-prefix issues occured with custom_breadcrumbs_paths (in two helper functions called _custom_breadcrumbs_paths_get_breadcrumbs, and _custom_breadcrumbs_paths_page_match. Its committed to the 6.x-2.x-dev now and available in cvs. Let me know if it needs further explanation.

As for the issue, I guess I forgot what issue I was responding to. This should really be marked as fixed (since version 6.x-2.x exists now even though we haven't gotten panels support in yet...), and the conversation continued on #372648: Custom Breadcrumbs 2.x.

thepanz’s picture

Ok, thank you! Let hope that Views2 breadcrumb settings doesn't have that isse... in that case someone will report it on the Views2 issue queue! :)

Issue Fixed :)

Status: Fixed » Closed (fixed)

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

lonestar790’s picture

I am looking to add the custom breadcrumbs to my new landing panel pages that were built in Panels 3.0. I was using the 6.14 version of the Custom breadcrumbs, which did work on all of my node types as prescribed. I was looking to add the breadcrumbs on all of my views and panels pages too with the newer version of the dev 6x.2x as it looked like it might have solved my problem.

I installed it and walked through the module admin section and it appears like it should be working. I have read that Custom Breadcrumbs needed a hook for the older version to work:

http://drupal.org/node/132557#comment-1823356

My landing pages are custom url panel pages with a hidden title.

Currently the breadcrumb says "home"

I have made a custom breadcrumb for that page, but no dice. Thank you for your time. I hope someone has some in site

Anonymous’s picture

Hello is there a version for 6.1.5?