Looking at the code it seems that you can generate only link breadcrumbs.

In some cases you will want a plain text crumb, typically the last one if it is the title of the current page.

Would it be possible to lookout for a special marker as the URL (in the Paths textarea) and if present then generate plain text (just the corresponding title, do not run through l function). For special marker maybe something like: "--" or "
".

As a less flexible alternative, you could provide a checkbox on the Custom Breadcrumb form to disable the link for the last crumb. Something like "Make last crumb plain text".

I can provide a patch if you think it is a good idea and would like to add this feature.

Comments

MGN’s picture

Category: feature » support

This feature already exists. Try using the token <none> for the path where you do not want a link.

mariuss’s picture

Category: support » feature

Nope, there is no such feature, just tried. At least not in 5.x-1.2.

I also searched the source code, no reference to "" at all.

Maybe a feature in 6.x?

MGN’s picture

Looks like it was added to DRUPAL-5 about two years ago (Commit #60360 by Eaton), but it was never released. I've just added a release node for 5.x-1.x, so the code should be availble within 12 hours. You can always get the latest code from cvs.

See http://drupal.org/cvs?commit=60360 for details.

mariuss’s picture

Still no dev build, or any other release, for 5. Can you please double check?

How about a 5.x-1.3?

Thanks

MGN’s picture

Yeah. I have checked and for some reason, d.o. isn't publishing it. I am not sure why not, and am going to have to ask the webmasters whats going on...In the mean time, check it out from cvs. Sorry for the delay - not something I can control.

I don't want to release a new version number that hasn't been tested (in two years). Its better to have it tested as dev first, then released once its proven to be stable. Hope this makes sense.

MGN’s picture

Ok. The system just packaged the 5.x-1.x-dev version. Can you give it a try and report if there are any problems. As far as I can tell, its been sitting for a couple of years...Thanks!

mariuss’s picture

Title: Correct install problems with custom_breadcrumbs 5.x-1.x-dev » allow plain text crumbs
Version: 5.x-1.x-dev » 5.x-1.2
Category: bug » feature

Thanks, seems to work.

A few minor issues:

1. Right after the update got this error: "user warning: Unknown column 'visibility_php' in 'field list' query: UPDATE custom_breadcrumb SET titles = '[title]', paths = 'node/[nid]', visibility_php = '', node_type = 'page' WHERE bid = 2 in /home/lohas/drupal5/core/includes/database.mysqli.inc on line 156."

Most likely this comes from update_1. At that point there is no visibility_php column yet.

2. On the Drupal Update result page, the message for update_1 is just one letter: "c".

3. For MySQL the new visibility_php column should be default '' and NOT NULL. It ends up the other way around. In update_2 revise the ALTER TABLE (maybe it was swapped with pgsql).

4. When editing a custom breadcrumb, under the "Paths" textarea, you may want to mention "< none >".

MGN’s picture

Title: allow plain text crumbs » Correct install problems with custom_breadcrumbs 5.x-1.x-dev
Version: 5.x-1.2 » 5.x-1.x-dev
Category: feature » bug

Great. Thanks for looking into this. Would you be willing to write a patch that makes the changes you suggest? I can review the code but can't test it since I am just working on DRUPAL-6 now. So it would be better if someone else makes the patch....

mariuss’s picture

Title: allow plain text crumbs » Correct install problems with custom_breadcrumbs 5.x-1.x-dev
Version: 5.x-1.2 » 5.x-1.x-dev
Category: feature » bug
StatusFileSize
new3.42 KB

See attached implementation. Not a patch, but the actual files.

MGN’s picture

Status: Active » Needs review
StatusFileSize
new2.27 KB

I found a couple of problems with the changes in #9:

1. Can't renumber updates - see http://api.drupal.org/api/function/hook_update_N/5.
2. db_add_column is only to be used for Postgres, not mysql - see see http://api.drupal.org/api/function/hook_update_N/5.

Also there was another, related patch that was committed to 5.x-1.x-dev - #346113: PgSql Support

Otherwise I've made the changes recommended in #9.

I would appreciate it if someone could test the attached patch. Its against the latest 5.x-1.x-dev (updated on April 29th).

MGN’s picture

Status: Needs review » Postponed (maintainer needs more info)

I am prepared to commit this but would like someone to test it first. Anyone willing to help on this?

MGN’s picture

Status: Postponed (maintainer needs more info) » Needs review

Changing the status so perhaps someone will test this so it can be committed. Thanks.

MGN’s picture

Status: Needs review » Fixed

Committed to 5.x-1.x-dev for further testing.

Status: Fixed » Closed (fixed)

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