[Catalyst] Re: Action for index not 'index'?

Aristotle Pagaltzis pagaltzis at gmx.de
Thu Mar 24 21:00:17 GMT 2011


* Marius Olsthoorn <olsthrn at gmail.com> [2011-03-24 10:25]:
> We use the same technique. We have some breadcrumbs that extend
> the path of the previous breadcrumb. Eg. Home > User > Rating
> corresponds with paths '/', '/user/<id>/, '/user/<id>/rating'.
>
> Our version has support for this if you pass it an 'append_url'
> option instead of just 'url' in the relevant parts of your
> chain.

This encodes your URI structure into your `add_breadcrumb` call
*sequence* as well as the chain structure, though. If you leave
the job all to `uri_for_action` you can shuffle things around and
the breadcrumb links will continue to be correct with no extra
work. I doesn’t happen a lot, but I was glad for the magic each
time it did. It doesn’t cause much redundancy either, you just
have to pass a few ID values a few times extra.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>



More information about the Catalyst mailing list