Tuesday, December 30, 2008

Re: Model data in all views

I think your best bet is to use requestaction on the categories
controller and include an element on your default layout, have a look at
http://bakery.cakephp.org/articles/view/creating-reusable-elements-with-requestaction

Daniel wrote:
> Hi there, sorry to bother you with what is probally a very simple
> question, but I'm new to cake and having some trouble getting to grips
> with it.
>
> I'm working on a simple e-commerce site for an assignment at
> university, I have a Category model set-up, which is going to be used
> to group products together.
>
> I've set-up a default.ctp file for my layout, and I wanted to be able
> to have the list of categories, from the model, display within the
> default.ctp file, so it's shown on every page of the site. It's going
> to be an unordered list, which links to the relevent page to display
> the products within that category.
>
> Thank you.
>
> >
>
>


--~--~---------~--~----~------------~-------~--~----~
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: