Crumbs

Hello everyone!

I just begin with YII. I wish my applicattion to show crumbs in this layout.

My doubt: My DIV#crumb is written in Layouts/main.php. How could I work with it dinamically? How could I set my crumbs links dinamically? Should I do it in Layout as MainMenu? Should I try send information throught controller?

Is my crumb in the right place? Should it work as a element that requires a controller action?

Thanks!

(Sorry about some English mistake)

Yes, your crumb could be designed as a widget that is similar as MainMenu. You supply dynamic links to the crumb by configuring it in the layout. How to obtain those dynamic links depends on your actual design, though.

Ow! Thanks! Im gonna try! Ill come back soon :)

Thanks!

Should I use Session php attributes on my widget script to store navigation ?

Is there a way to get history navigation in my widget using YII?

Guys, I resolved it wrinting my application navigation as a hierarchical array. So I get the current controller and action and take it an array in the view.

Its not so gud as I wish it could be but Ill try to make it better and post it on.

Here's a simple approach with a BreadCrumb widget if you want to manually create  bread crumbs in any views:

http://www.yiiframew…oc/cookbook/23/

Ow! Thanks! I did it to work in layout main.php.