The Easy Breadcrumb module provides a plug-and-play block to be embedded in your pages, typically at some place near the page's header. This modules is currently available for Drupal 7.x.
Easy Breadcrumb uses the current URL (path alias) and the current page's title to automatically extract the breadcrumb's segments and its respective links. Easy Breadcrumb is really a plug and play module, it auto-generates the breadcrumb by using the current URL, the user needs to do anything to get it working. The resulting block will be something like: Home >> Contact Us or Home / Contact us. The breadcrumb presentation could vary depending on the module's settings.
By example, having a URL like gallery/videos/once-a-time-in-cartagena, Easy Breadcrumb will automatically produces the breadcrumb Gallery >> Videos >> Once a time in Cartagena or Gallery >> Videos >> Once a Time in Cartagena. Again, the breadcrumb presentation could vary depending on the module's settings.
For consistency, this module requires the Pathauto module. Easy Breadcrumb naturally encourages the creation of semantic and consistent paths.
Configuration
To start using it, just go to the admin modules page (URL admin/modules/list), locate it under the category "others" and activate it, then go to the blocks list page (URL admin/structure/block) and locate the block named "Easy Breadcrumb", and configure it like any other block (region, URLs, etc.).
The configuration page of this module is under Admin > Configuration > User Interface > Easy Breadcrumb (URL admin/config/user-interface/easy-breadcrumb).
Options provided for this module:
- To disable the Drupal default breadcrumb: mark / unmark the checkbox Disable the default Drupal's breadcrumb.
- To include / exclude the front page from the breadcrumb: mark / unmark the checkbox Include the front page as a segment in the breadcrumb.
- To include / exclude the current page's title from the breadcrumb: mark / unmark the checkbox Include the current page's title as a segment in the breadcrumb.
- To decide if the module should use the page's title when it is available instead of it always trying to deduce it from the URL: mark / unmark the checkbox Use the page's title when available.
- To decide if the module should print the title as a link then mark / unmark the checkbox Make the page's title segment a link.
- To use a custom separator between the breadcrumb's segments: just enter the string (default to ">>") to be used as the segments separator in the textfield Segments separator.
- The module allows to choose a transformation mode for the segments' title: for this, choose one of the provided options in the combobox Segments title's transformation mode.
- You might want some words to be ignored (not to be capitalized) by the 'capitalizator'. For this, enter the desired words to be ignored by the 'capitalizator' separating them with a space. There is a 'textarea' named Words to be ignored by the 'capitalizator' for this purpose.
Module Page:
http://drupal.org/sandbox/sonemonu/1395492
Git:
git clone http://git.drupal.org/sandbox/sonemonu/1395492.git easy_breadcrumb
Credits
Authors:
- Roger Padilla Camacho (sonemonu).
Sponsored by ZoneSoftware.
| Comment | File | Size | Author |
|---|---|---|---|
| #28 | Configuration page.png | 65.06 KB | jygastaud |
| EasyBreadcrumb settings page.PNG | 46.53 KB | sonemonu |
Comments
Comment #1
jasonrichardsmith@gmail.com commentedDoes this module add functionality the below module does not?
http://drupal.org/project/custom_breadcrumbs
Comment #2
sonemonu commentedHey Jason,
Yes, for sure, thanks for asking. EasyBreadcrumb uses the current URL (path alias) and the current page's title to automatically extract the breadcrumb's segments and its respective links. EasyBreadcrumb is really a plug and play module, it auto-generates the breadcrumb by using the URL, the user needs to do anything to get it working.
By the other side, the Custom breadcrumbs module uses content-types for generating breadcrumbs, it is a different thing. From its page: Allows administrators to set up parametrized breadcrumb trails for any node type. This allows CCK-style node types to have "Home > User Blog > 2005 > January" style breadcrumbs on the node view page itself, synchronizing cleanly with custom views or pathauto aliases.
Comment #3
jasonrichardsmith@gmail.com commentedPlease check this code review. You never indicated your version of Drupal
http://ventral.org/pareview/httpgitdrupalorgsandboxsonemonu1395492git
Comment #3.0
jasonrichardsmith@gmail.com commentedExtended documentation
Comment #3.1
sonemonu commentedImproving documentation
Comment #3.2
sonemonu commentedImproving documentation
Comment #4
sonemonu commentedHey Jason,
Thanks again. I have reviewed and corrected the errors from the code review (I've used http://ventral.org/pareview/ for performing the review).
There still are "warnings" related to "Bad line endings were found, always use unix style terminators" which I know are not really errors.
Please give your feedback again.
Thanks,
Roger Padilla
Comment #5
sonemonu commentedHey Jason,
Please let me knows if you have news about this.
Thank you.
Comment #6
sonemonu commentedWhat about this, can somebody help please?
Comment #7
sonemonu commentedWhat about this, can somebody help please?
Comment #8
sam152 commentedGit access for anyone requesting it: git clone --branch 7.x-1.x http://git.drupal.org/sandbox/sonemonu/1395492.git
Hi sonemonu, there seems to be quite a few different problems that have been flagged with Ventral. I would recommend going through each one, line by line and trying to fix them up as best you can.
A couple of issues I faced when using your module.
[Sun Mar 04 13:42:05 2012] [error] [client 127.0.0.1] PHP Fatal error: require_once(): Failed opening required 'EasyBreadcrumb_Constants.inc' (include_path='.:/usr/share/php:/lib/zend/library') in /home/sam/Sites/drupal7/sites/default/modules/1395492/easy_breadcrumb.module on line 10, referer: http://drupal7.sam/?q=admin%2Fmodules&render=overlayI'll see how you go with these and come back at a later date and check it out again.
For sites that have URLs that strictly follow a defined menu structure, this could be a great module.
Comment #9
sam152 commentedComment #10
sonemonu commentedHi Sam, thanks for your comments. I've corrected the reported bugs and almost all the warnings. Please check again.
Thanks again.
- Roger Padilla
Comment #11
jygastaud commentedHi sonemonu,
There are still errors and warnings that appears on automated review: href="http://ventral.org/pareview/httpgitdrupalorgsandboxsonemonu1395492git-7x-1x">PAReview
Automated review
Review of the 7.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. Get a review bonus and we will come back to your application sooner.
Source: http://ventral.org/pareview - PAReview.sh online service
Manual Review
Structure: Maybe it could be cleaner to put all ".inc" files into an "includes" directory.
.module: You should remove @version 1.0 - 2012-01-05. Version should be .info and when your project will get into full project, d.o will add these information automatically.
Comment #12
jygastaud commentedComment #13
sonemonu commentedHello Jean,
I've followed your recommendations and corrected all the errors and almost all the warnings. There still some odd warnings which says "Files must end in a single new line character"; but if you check the files, there do exists such single new line. I'm on Windows 7 using Netbeans 7.1.1.
IMHO, such "warnings" are superfluous, and are not really warnings. Indeed, I've fixed some odd warnings like "no more than 80 characters per line" such rule is really deprecated (that was from 90's).
BTW: I've added a new option to the module for allowing to exclude some words from the "capitalizator", something like the pathauto module does.
Thank you.
Comment #13.0
sonemonu commentedDocumentation
Comment #14
jygastaud commentedHi,
If you're working on netbeans for Windows, you can add this plugin which will allow you to convert line endings or use dos2unix in a unix workstation
Also, in my mind, you should completly review your .tpl.
You should use preprocess on your module and only display the result on your tpl.
Also you should consider to use "print" instead of "echo"
Comment #15
sonemonu commentedHi Jean,
Thanks for the recommended NetBeans plugin.
Regarding my .tpl, I'm going to explain why I'm doing with this:
As you can see, my .tpl haven't logic, it just formats the output. That is, put each segment inside a span tag identified by a class, and each separator inside a span tag identified by another class. Having such tag elements inside my .module (or any other non .tpl) would meant putting presentation code in the logic tier.
Regarding the print vs echo, I knows echo is faster than print and it works perfect in this case. ¿Why do you suggest to use print instead of echo (I've always heart the opposite is better)?
I've scanned my code and there are 0 errors, just three "warnings" wich recommends use Drupal string overwritten functions instead of the natived PHP ones, but that don't have sense in this case.
Comment #16
patrickd commentedHi,
sorry for the delay!
as there are currently many applications in queue we need more reviewers,
so think about getting a review bonus and we will come back to your application sooner.
Comment #17
patrickd commentedcount($breadcrumb);as preprocessing would be goodthe 80 characters thing, is only for comments, in cases like above there is no sense of doing a linebreak
should be
fileparameter to your .infoOkay, so lets get those issues managed and I'll continue! :)
You can raise the issue priority up again after 2 weeks of no reviews.
Comment #18
sonemonu commentedComment #19
patrickd commentedswitching back without comment is a little strange ?
Comment #20
sonemonu commentedHey Patrick,
Thank you. I've implemented all of your corrections excepting the below ones. I must say against some of those, I'm putting my explanation alongside each one, please check.
Thanks again.
Comment #21
sonemonu commentedHi Patrick, I'm sorry, it was my mistake the empty comment. I can't delete it, so I just removed its content :(
Please check my previous comment. Thanks.
Comment #22
sonemonu commentedI'm raising the issue's priority up of this since it has 2 weeks of no reviews.
Please check comments #17 and #20, thanks.
Comment #23
jygastaud commentedHi,
Made a quick look and your admin page is not available.
Looks like you have an error in admin.inc at line 18.
I thin it should be
Comment #24
jygastaud commentedChange status to need work.
Comment #25
sonemonu commentedHey Jean, thank you.
I've implemented all your recommendations excepting add a direct link to "admin/config/easy-breadcrumb into Configuration page" because of that is not clear for me. ¿Can you explain that, please?
I've also added some other (minor) improvements.
Please check.
Comment #25.0
sonemonu commentedUpdating documentation
Comment #26
chertzogI believe that @jygastaud is talking about adding a configure link to your .info file. See http://drupal.org/node/542202.
In your .info file add the following:
Comment #26.0
chertzogAdding options
Comment #27
sonemonu commentedHey @chertzog, thanks for your reply.
That line was committed to my .info since the 10.March.2012.
Comment #28
jygastaud commentedHi,
What I suggest is to add a link which can be saw directly in admin/config page as you can see into the file attach.
To do that, I only transformed your menu link from admin/config/easy-breadcrumb to admin/config/user-interface/easy-breadcrumb into .info and .module.
Maybe it's not the better package to add this, you should look about other module to see where they add it.
I will try to make an in-deep review soon.
But, as previously mentionned by patrickd at comment #16, you really should consider to made some reviews of other projects to get the review bonus tag and have your project review sooner by official reviewers.
I do that for mine and it's working very well.
Comment #28.0
jygastaud commentedCorrected mixed option
Comment #28.1
willietse commentedadd module git path
Comment #29
sonemonu commentedHi Jean,
Thanks. I looked on a project which have a lot of installed modules, but definitely the better admin-menu's sub-section to moved it is "User Interface". I committed such change.
I've the patrickd's comment (#16) very present and I would like a lot to do that; but I would prefer take it for future projects contributions (I've one very insteresting related to libraries in planning) since I'm vey busy right now fighting against a 1000-things-to-do-per-person crisis in my company.
Comment #29.0
sonemonu commentedupdated for reflacting new URL for configuration
Comment #29.1
sonemonu commentedAdded documentation for last changes and for new option
Comment #30
sonemonu commentedI'm raising the issue priority up since this has 4 weeks of no-reviews now.
Thanks.
Comment #31
scot.hubbard commentedThere still seems to be quite a few errors in coding standards (see http://ventral.org/pareview/httpgitdrupalorgsandboxsonemonu1395492git).
Also, in the .install file you have used a SQL query to remove variables used by the module on uninstall. Have you considered using variable_del()?
Comment #32
patrickd commentedjust minor coding style isses
using variable_del() should not be a requirement
-> no reason for needs work
Comment #33
scot.hubbard commentedHi patrickd, maybe I was a little too harsh changing the status for these findings, but after installing and playing with the module this was all I could really find. If these minor coding standards issues were fixed, not only would this be a nice little module, but also one that is fully compliant.
Comment #34
jygastaud commentedHi,
For me module is really close to RTBC once small issues previously mentioned will be solved.
I added an issue #1548896: URL items to clarify one point I previously mentioned and you made something different but it is not a reason to no have RTBC.
Comment #35
sonemonu commentedThanks you all for your valuable reviews.
Comment #35.0
sonemonu commentedFormatted
Comment #35.1
sonemonu commentedSpelling corrections
Comment #36
jygastaud commentedFor me it's RTBC.
Only one minor coding standards issue found via Coder module but these should not locked approval.
Comment #36.0
sonemonu commentedChanged "separating them with commas" by "separating them with a space"
Comment #37
sonemonu commentedHey jygastaud,
Thanks. I've added a space after that comma, but now ventral is warning about that; previously it was not.
Comment #38
jygastaud commentedDidn't try but with these code, both coder and ventral should be OK
Comment #39
sonemonu commentedVentral is not yelling anymore after applying that kind of "hack".
Thanks jygastaud.
Comment #39.0
patrickd commentedAdded credits
Comment #39.1
sonemonu commentedImproved format
Comment #39.2
sonemonu commentedImproved
Comment #39.3
sonemonu commentedImproved format
Comment #40
patrickd commented'info' => 'Easy Breadcrumb',you should make this translatablet("¿Should this module disable the default Drupal's breadcrumb?");Please don't use these upside down question marks, this will only make the live of translators harder.It makes no sense to check_plain() static/hardcoded text.
Major issues you should fix: 3, 4, 7, 12. The rest is strongly recommended.
Leaving RTBC, tell me if you fixed them, I'll have a final look asap.
Comment #40.0
patrickd commentedImproved format
Comment #41
sonemonu commentedHey patrickd, thank you so much.
I've some comments in several points, please check.
Comment #42
patrickd commented3. We should keep all possibilities open, as general practice advises.
4. hmm, well that's not the general practice, but after some searching I could not find a reason against it, therefore - okayy if you really want to do it this way
8. You don't have to fully satisfy any issues of automated tools - these things are pretty dumb - especially on finding possible security issues
these tools should point you to possible issues - and suggest you to make proper changes - but nobody can force you to have a clean report result (that's sometimes just not possible) - but whenever you can and it makes sense, try to follow best practices and coding standarts
11. nope sorry, no idea, but I'm sure it's possible
Sidenote: your other module "easy module" sounds like a duplication of module builder. please always make sure to spend some time searching for existing modules (I know this can take up to two hours sometimes ;D) before you create a new module.
Well, so far this looks fine to me.
Thanks for your contribution and welcome to the community of project contributors on drupal.org!
I've granted you the git vetted user role which will let you promote this to a full project and also create new projects as either sandbox or "full" projects depending on which you feel is best. Remember this power brings responsibility ;-)
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
As you continue to work on your module, keep in mind: Commit messages - providing history and credit and Release naming conventions.
Thanks to the dedicated reviewer(s) as well.
Comment #43
sonemonu commentedHey patrickd, thank you very much.
11. I've inspected the code of the disable_breadcrumbs module, version 7.x-1.3 stable. It uses the following function to disable the Drupal's default breadcrumb, which is, sometimes, invoked from the hook_init (like my module does). So I guess that's an issue related to your theme.
Sidenote: being honest, I did not knew about "module_builder"; I need to install it and review what it does and how it does. To the naked eye (from its documentation), I can note such module has the database "burned" together with each version. One great advantange of my module is that it do obtains that information from www.api.drupal.org (using a "web crawler"), which will brinds the most up-to-date information about hooks. Again, I need to do a major review. But it's always good the sane competence. I see "module_builder" has no competence, and this may be a different approach for solving the same problem. Do you think there is a chance "easy_module" would be good?
Thanks everybody who helped me to improve this module and with that my skills! Special thanks to: jygastaud and patrickd.
Comment #44
patrickd commentedI was using bartik while testing, maybe it's doing some untypical stuff in it's preprocessing function (maybe you can try to override this through hook_theme_alter()) - just a guess
hmm, maybe you should just create an issue at the module builders queue and tell them about your approach. Then you can decide whether you want to merge your modules, always good to think about joining forces first ;-)
Comment #45.0
(not verified) commentedImproved format