Limiting breadcrumbs by path and choosing where to insert

deviantintegral - January 29, 2008 - 17:33
Project:Custom Breadcrumbs
Version:5.x-1.2
Component:Code
Category:feature request
Priority:critical
Assigned:Unassigned
Status:needs review
Description

Hi,

I've attached a patch which does the following:

  1. Allows for breadcrumbs to be created which are filtered by a path, similar to block filtering. This means that you can create multiple breadcrumbs for the same node type, but ensure that they work across different sections of the site.
  2. Allow for the breadcrumb that's generated to be appended to the beginning of an existing breadcrumb, to the end of the existing breadcrumb, or replace outright. This is useful (in my case) to add missing links in the middle of an existing breadcrumb.

I know it's bad form, but this patch is against the 1.2 version as that's what the site I'm working on is using. But if the functionality looks good, I will port it to whatever version it needs to be :).

Thanks!
--Andrew

AttachmentSize
limit_by_path_and_insertion_placement.patch8.79 KB

#1

scottrigby - February 23, 2008 - 23:14

Hmm, I got an error.
- I uninstalled custom breadcrumbs.
- Then I installed the patch, and uploaded patched files.
- Then I enabled the it in /admin/build/modules

I got this error:

user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(bid) ) /*!40100 DEFAULT CHARACTER SET UTF8 */' at line 8 query: CREATE TABLE custom_breadcrumb ( bid int unsigned NOT NULL auto_increment, titles varchar(255) NOT NULL default '', paths varchar(255) NOT NULL default '', node_type varchar(64) default '', pages varchar(255) default '', placement varchar(64) default '' PRIMARY KEY (bid) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in /home/scott/public_html/njsavings/includes/database.mysql.inc on line 172.

Any thoughts about what I may have done wrong?

Thanks! Cause this would be great functionality

Scott

#2

scottrigby - February 24, 2008 - 00:50
Priority:normal» critical

ugh.

Ok, so I tried to uninstall this patched module (after disabling it), and get the following error:

user warning: Unknown table 'custom_breadcrumb' query: DROP TABLE custom_breadcrumb in /home/scott/public_html/njsavings/includes/database.mysql.inc on line 172.

Now I'm kind of stuck. where do I go from here?

Thanks for any help!
Scott

#3

scottrigby - March 5, 2008 - 22:35

No suggestions? :(

#4

scottrigby - May 10, 2008 - 00:49

Hi -
has there been any progress on this?

I'm no longer grappling with the error above (reinstalled site a while ago)...

But this functionality would be very useful on other sites -- especially adding before an existing breadcrumb.

One example illustrates how useful this would be:
Another module - Node hierarchy, automatically shows children of children of children (etc) in order, in the breadcrumb. However, if the content-type were called 'project', and I wanted the url to go something like: http://url.com/projects/parent/child/grandchild/greatgrandchild
then it would make sense for the breadcrumb to also go something like:
Home › Projects › Parent › Child › Grandchild › Greatgrandchild
But AFAIK, there is no way to do this using custom breadcrumbs as it is (each breadcrumb needs to go on it's own line, so a specified number of crumbs is all we can do).

However, adding to the beginning would allow us to take advantage of the NH module's existing functionality, and still customize our breadcrumb.

So, I'm wondering - has anyone had success with this patch? Or deviantintegral - did you get some updated version of this to work for your own use (if so, care to share)?

Thanks in advance for any help, suggestions, leads...
:)
Scott

#5

deviantintegral - October 9, 2008 - 14:56

Hi,

Apparently I didn't get updates on this issue via email, so I had no idea anyone else was interested! I haven't changed anything since I made the patch, and am currently using it successfully on a live site. Hopefully you got it working.

It would be great if the maintainer could give me feedback if I'm on the right track, so this can be improved and integrated.

Thanks!
--Andrew

#6

wildmtsky - May 1, 2009 - 18:02

I manually added this patch and I receive the following error:

user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'titles, paths, node_type, pages, placement) VALUES ('Public Policy', 'pub', 'p' at line 1 query: (titles, paths, node_type, pages, placement) VALUES ('Public Policy', 'pub', 'page', 'pub/*', 'begin') in C:\wamp9.22\www\includes\database.mysql.inc on line 174.

Did I mistype or is this an issue? Any help would be appreciated!

#7

deviantintegral - May 1, 2009 - 19:08

Did you run update.php after applying the patch?

You might find it easier to not apply it manually: http://drupal.org/node/60179

#8

wildmtsky - May 1, 2009 - 19:58

Hey, thanks for the alternative to manually patching...I tried Tortise (I believe) but I need to play around with the "how-to" a little more because I don't understand quite how it works..

But I re-did the manual patching, ran update.php and everything works beautifully.

Thanks for your reply!

 
 

Drupal is a registered trademark of Dries Buytaert.