Friday, August 28, 2009

Re: Organizing hierarchical system with breadcrumb navigation

Hi,

On Aug 27, 10:27 pm, Braindead <markus.he...@gmail.com> wrote:
> In my opinion using a model for breadcrumbs is bloated. Why don't you
> just set the breadcrumbs in the view manually? The HTML helper has two
> functions addCrumb and getCrumbs, which makes basic breadcrumbs really
> simple.

Well, I am using a "menus" model/controller/view to generate the menu,
so it is no big deal to set a viewVar to be used in the breadcrumb. I
am using a Crumb Helper (http://bakery.cakephp.org/articles/view/
breadcrumb-helper
) in the view like so:

echo $crumb->getHtml($menuttitle, null, 'auto' ) ;

But maybe I should back up and look at the add/getCrumb in the HTML
helper. I was thinking that if I stored menu links as fully-qualified
paths like "/financial/budgets/index" I could then split that path and
turn it in to "Financial > Budgets > Index" breadcrumb.

I guess the bigger question is whether to map something like "/budgets/
action" to "/financial/budgets/action" using routes.php.

Adn I guess a more general questions is what do people do if they want
to create a hierarchical application view when the default
organization of "model/action" is "flat" under the application root.

Thanks,

Jim

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: