Re: Newbie: What is the "proper" way of rendering views within views?

2008-10-17 Thread Robert
First be aware I am rather new to cakephp so I may be wrong :) And I came from more complex things like websphere and .net so I may have wrong habits :) First I thought about views like You, but it felt like running against the wind. It helped me really to think about views as pages from the site

Re: Newbie: What is the "proper" way of rendering views within views?

2008-10-17 Thread Stan
Thanks, Robert. What happens when you introduce ajax into the equation, and now you want to dynamically reload one of these elements (for example, customer had 5 inquiries, you're showing one at a time through ajax). Do you now have to create an action/view for each of these elements anyway so tha

Re: Newbie: What is the "proper" way of rendering views within views?

2008-10-17 Thread Stan
What bugs me is that they are conceptually different views of a model, not reusable web page elements -- i.e. they are not menus, sidebars, headers, footers... With that kind of architecture, I'd end up with "customer" controller retrieving and passing "inquiry" data to "customer" view, which then

Re: Newbie: What is the "proper" way of rendering views within views?

2008-10-17 Thread Robert
> What is the proper "cake-way" of doing this? I think You don't need views for inquiries, only elements. Views are for separate pages, to render inquires on customer page use elements or even some kind of helper... anyway thats the way I do it. :) Robert --~--~-~--~~~-

Re: Newbie: What is the "proper" way of rendering views within views?

2008-10-16 Thread David C. Zentgraf
I don't see the problem with using elements, that's exactly what they were made for. Layouts: outer wrapper, same for all pages (or very few different variations) Views: the actual "page", usually one per action Elements: re-usable pieces of a view that are the same on many pages You can put

Newbie: What is the "proper" way of rendering views within views?

2008-10-16 Thread Stan
>From what I could gather in other posts, it seem like the right way to do this is through requestAction, although there are a few things which don't seem right. Let me very briefly explain my setup which should be fairly common. I have 2 tables, customers, and inquiries. Customers hasMany inquir