Well,
U can also make use of requestAction in the layout, in components and I
guess in elements too.
In my abroad experiences, sometimes, I found myself very happy when I
could hide my French origin...
Brian French wrote:
Thanks for your help!
In response to my own first question, i am assuming that i am correct
as i would have to call the requestAction for each block for each page
unless they occure everywhere in which case i could use beforeRender()
Yes I'm American and no, it's not hard to live with :-p
The average American isn't as prejudice as people may believe :-p
Olivier Percebois-Garve wrote:
Hi
I think requestAction is made for that.
To avoid a method to be accessed, just use "_" as prefix e.g :
function _blabla(){
//blabla
}
Are u american ? Isn't your lastname difficult to live with there?
Brian French wrote:
Im still in the process of wrapping my head around the MVC. I understand
the roles of each of the elements. What i am coming across that i cant
seem to figure out is how to have multiple elements work on 1 page.
Example: Myspace (i know, but good example of what im talking about).
On the homepage you have multiple elements: Music box, Specials box,
Cool new people, and videos.
In my understanding of MVC, each one of them would be a different
controller, prob calling the same method name like GetBlock or
something. ($specials->GetBlock();, etc. ). So, the cakephp url would be
'Specials/GetBlock'. I have ran across the method 'requestAction' which
can call the multiple controllers, by the cakephp url in the page
controller. Then assign it to a variable to be used in the view.
Questions:
1. would i basically have to create a seperate method for each of the
pages i would have?
2. would the above way of using requestAction be the right way of
accomplishing this or is there a better way to do this?
3. in doing it this way, what is preventing someone from access the url
'http://www.blah.com/Specials/GetBlock'?
I hope i have explained this well enough.
Brian
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~----------~----~----~----~------~----~------~--~---
|
- Re: multiple controllers on 1 page Olivier Percebois-Garve
-