I think I understand... It sounds to me like you should have two
actions, not one:
http://www.some.com/controller/viewList/
http://www.some.com/controller/viewTable/

Having one view to encapsulate two doesn't sound correct... but I'm
still new at this myself.


On Jul 31, 12:48 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Thanks for the reply!
>
> The problem I am running into is that I need different views for the
> same information.  For example, when someone 
> visitshttp://www.some.com/controller/view/1
> it will show say a list of links.  Inhttp://www.some.com/controller/view/2
> it will show similar information from the database but as a table
> instead of a list of links.  Right now for me to do this I set the a
> variable that holds the view that I want to show.  So in my actual
> view.thtml file I have a switch statement off of this view variable I
> set in my controller so the actually view.thtml knows what view I need
> to show (in this example the list or the table).
>
> Does this make sense?
>
> On Jul 30, 5:58 pm, Grant Cox <[EMAIL PROTECTED]> wrote:
>
> > Are you talking about several different "skins", but really the same
> > data and presentation?  Or are you talking about some non-trivial data
> > calculation, then you want to show the result in several independent
> > areas of your site?  I'm just not sure of the reason for the several
> > views on a single action.
>
> > For the former, have a variable (perhaps session) that determines
> > which layout to use, or even to choose another view file to render (if
> > the structure needs to be quite different).  For the latter, you
> > should move the functionality into the appropriate model or component
> > file, so that it can be called from any number of controller actions
> > without duplication.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to