Download & Extend

Pluggable Breadcrumbs

Project:Views
Version:7.x-3.x-dev
Component:page displays
Category:feature request
Priority:normal
Assigned:dawehner
Status:needs review
Issue tags:views 3.x roadmap

Issue Summary

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.

AttachmentSizeStatusTest resultOperations
pluggable-breadcrumbs-views.patch15.58 KBIdleFAILED: [[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 details | Re-test

Comments

#1

Adding a tag.

#2

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

AttachmentSizeStatusTest resultOperations
1052312-views-pluggable-breadcrumbs.patch15.63 KBIdleFAILED: [[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 details | Re-test

#3

Status:needs review» needs work

Missing translatable support.

#4

Status:needs work» needs review

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.

AttachmentSizeStatusTest resultOperations
1052312-views-pluggable-breadcrumbs-4.patch17.64 KBIdleFAILED: [[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 details | Re-test

#5

Subscribing

#6

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

#7

-Deleted-

#8

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.

AttachmentSizeStatusTest resultOperations
1052312-views-pluggable-breadcrumbs-8.patch19 KBIdleFAILED: [[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 details | Re-test
1052312-views-pluggable-breadcrumbs-structure.patch10.2 KBIdleFAILED: [[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 details | Re-test

#9

Version:6.x-3.x-dev» 7.x-3.x-dev

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

AttachmentSizeStatusTest resultOperations
pluggable-breadcrumbs-1052312-9.patch15.71 KBIdlePASSED: [[SimpleTest]]: [MySQL] 1,311 pass(es).View details | Re-test

#10

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.

#11

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.

#12

Triggering the testbot.

#13

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

#14

Assigned to:Anonymous» dawehner

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

nobody click here