The following patch allow users to choose a more specific way to render the breadcrumbs for a page display.

Also make breadcrumbs a plugin so other modules can provide new ones.

Files: 
CommentFileSizeAuthor
#9 pluggable-breadcrumbs-1052312-9.patch15.71 KBdagmar
PASSED: [[SimpleTest]]: [MySQL] 1,311 pass(es).
[ View ]
#8 1052312-views-pluggable-breadcrumbs-8.patch19 KBdagmar
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1052312-views-pluggable-breadcrumbs-8.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#8 1052312-views-pluggable-breadcrumbs-structure.patch10.2 KBdagmar
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1052312-views-pluggable-breadcrumbs-structure.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#4 1052312-views-pluggable-breadcrumbs-4.patch17.64 KBdagmar
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1052312-views-pluggable-breadcrumbs-4.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#2 1052312-views-pluggable-breadcrumbs.patch15.63 KBdagmar
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1052312-views-pluggable-breadcrumbs.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
pluggable-breadcrumbs-views.patch15.58 KBdagmar
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch pluggable-breadcrumbs-views.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Comments

Issue tags:+views 3.x roadmap

Adding a tag.

StatusFileSize
new15.63 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1052312-views-pluggable-breadcrumbs.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Some cleanup. IMO I don't think it need much more changes.

Status:Needs review» Needs work

Missing translatable support.

Status:Needs work» Needs review
StatusFileSize
new17.64 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1052312-views-pluggable-breadcrumbs-4.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Added translatable support. Fixed some small issues with default values.

Custom breadcrumbs now don't merge with an existent breadcrumb, after all they are custom breadcrumbs.

Subscribing

I'm pleased to report that the patch works perfectly for me :)

-Deleted-

StatusFileSize
new10.2 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1052312-views-pluggable-breadcrumbs-structure.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
new19 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1052312-views-pluggable-breadcrumbs-8.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

After read this http://drupal.org/node/646284#comment-4381712 I think the easier way to include pluggable breadcrumbs is using another module.

So I'm attaching two different patches. The first one is an improved version of patch #4, that includes the ability to modify the link title, and provides a better ui.

The second patch only includes the necessary structure to make breadcrumbs pluggable. Is something similar to what we did for pluggable Exposed Forms. Less lines of code, less to review.

Of course It would be nice to see the first patch in, but I don't have any problems to maintain another module to provide custom breadcrumbs, however I need the structure patch in to do that.

Let me know what do you think.

Version:6.x-3.x-dev» 7.x-3.x-dev
StatusFileSize
new15.71 KB
PASSED: [[SimpleTest]]: [MySQL] 1,311 pass(es).
[ View ]

New patch, now for 7.x-3.x

This code has a less intuitive UI than #8 but doesn't need a custom function to translate the strings.

Two plugins are provided, 'default' and custom that allow users to create breadcrumbs with three parts: title, link and description for the link:

Each part of the breadcrumb is defined in one line. Each line should have a title and optionally a path and a description for the link to generate, i.e:

Home|***FRONT***|Go to front page
My content|content
You are here...

Will produce a breadcrumb like this:

Home > My content > You are here

The patch is definitive great work.

Just in general i'm wondering whether this is in the scope of views. The module custom_breadcrumbs gives a very flexible way to configure breadcrumbs system wide. That's what people actually need, as they have breadcrumbs issues not only with views.

If that module even adds a display extender it would be capable of everything.

Yes custom_breadcrumbs could do the job, as a custom module too.

However I'm thinking in three things at this moment.

1) Exportability (all the views stuff are into the view object)
2) Translations (allowing to translate all the part of the view using the new translation methods)
3) Access to arguments (I'm not sure if custom_breadcrumbs can do this at this moment)

Of course it is your decision, but something I have learn from views module is that allowing developers to create pluggings can make development of drupal sites much more powerful.

Triggering the testbot.

@dagmar: nice work! I tested it on the latest dev work in 7x.-3.x and it works nicely. I agree with your reasoning. I think the best solution would be to get a simple structural patch accepted and move development to a separate module.

I'm not familiar with Views coding to access the code itself. Have any views maintainers accessed this?

Assigned:Unassigned» dawehner

Assigning to @dawehner for feedback, I think #11 answers most of his questions.