This is a quick followup to my breadcrumb solution. If your application is internationalized, I think you might be interested in the code presented below. If not, stick with the original version.
Category Archives: breadcrumb
Breadcrumbs II: the Internationalization
Leave a comment | tags: before_filter, breadcrumbs, filters, gettext, i18n, internationalization, l10n, localization, ruby on rails | posted in before_filter, breadcrumb, filters, gettext, i18n, internationalization, l10n, localization, ruby on rails
Easy and flexible breadcrumbs for Rails
Most projects I work on require some implementation of breadcrumbs. Unfortunately most solutions that I found take the very simplistic approach: they split the URL and present each part as a link. I really have a hard time imagining that this can be sufficient for any non-trivial app.
I also found session-based implementation, but according to the above mentioned Wikipedia article classification these are path-style breadcrumbs, while I need location-style with a little bit of attribute-style mixed in where needed. That is, the breadcrumbs should normally reflect the page’s location in some (virtual) website hierarchy. Sometimes, while browsing things that are naturally hierarchical (like forum threads/posts, category trees and so on), the breadcrumb trail should also reflect this hierarchy. Read on to see my take on this problem.
40 Comments | tags: before_filter, breadcrumbs, filters, ruby on rails | posted in before_filter, breadcrumb, filters, ruby on rails
require ‘brain’
- Monkeypatching for cleaner code
- My Favorite Interview Question
- Hash bars – simple ASCII-art charts in your console, database or Excel
- The endless cycle of code vs docs
- WeekProgress — complete iPhone application source code available
- Don’t force them, teach them
- The future is now
- Palace Driven Development
- TDD Q&A
- I didn’t have enough time
Pages
-
Join 12 other subscribers
Archives
Top Posts
- Monkeypatching for cleaner code
- My Favorite Interview Question
- Hash bars - simple ASCII-art charts in your console, database or Excel
- The endless cycle of code vs docs
- WeekProgress — complete iPhone application source code available
- Don't force them, teach them
- The future is now
- Palace Driven Development
- TDD Q&A
- I didn't have enough time
Meta
Blog Stats
- 268,957 hits