Re: Determine current action using different method than $this->name

2007-04-02 Thread gerbenzomp
> One thing that might be relevant and becomes interesting in 1.2 is the > ability to cache elements (which I alluded to covertly in my previous > message); so instead of putting effort into the component/controller > side of things, you /could/ put requestAction or other logic in your > element a

Re: Determine current action using different method than $this->name

2007-04-02 Thread AD7six
On Apr 2, 1:40 pm, "gerbenzomp" <[EMAIL PROTECTED]> wrote: > The problem seemed to be that I cannot pass the variable $this->name > through requestaction. It would probably get overwritten if you put it in the params as 'name', but you could have passed it either in the url echo $this->request

Re: Determine current action using different method than $this->name

2007-04-02 Thread gerbenzomp
The problem seemed to be that I cannot pass the variable $this->name through requestaction. So that's another reason (apart from loading times) to use your 'mini-controllers' approach in this case. Thnx, it's working now! Is your mini-controllers method ever going to be a standard part of Cake? B

Re: Determine current action using different method than $this->name

2007-04-02 Thread AD7six
On Apr 2, 12:19 pm, "gerbenzomp" <[EMAIL PROTECTED]> wrote: > I tried both your examples, but the problem seems to be that I use the > requestaction within default.thtml, and it seems there's no data > available about the parent action... > > Is there some other way, because now I use the $_GET[

Re: Determine current action using different method than $this->name

2007-04-02 Thread gerbenzomp
I tried both your examples, but the problem seems to be that I use the requestaction within default.thtml, and it seems there's no data available about the parent action... Is there some other way, because now I use the $_GET['url'] method, which is just very dirty and unreliable. On 2 apr, 08:2

Re: Determine current action using different method than $this->name

2007-04-01 Thread jitka
No 'standard' way how to determine action where requestAction was called from (except for $_GET['url'] which is not 'clean usage of cake' as You obviously do not need to use $_GET directly in cake). But: You can pass some parameter to requestAction like $a = $this->requestAction('/some/url', arr

Re: Determine current action using different method than $this->name

2007-04-01 Thread TekJansen
I think something like $this->params['controller'] will just give the currently executing controller ("main" or "plugin") and this is not what you want. I'm unclear on exactly what your goal is, but it seems there are two options: 1. make the "plugin" code generic, have it do its thing, return d

Re: Determine current action using different method than $this->name

2007-04-01 Thread BlenderStyle
This is probably a crappy response, but try print_r($this->params) and see what's in there. It might have what you're looking for. On Apr 1, 5:29 pm, "gerbenzomp" <[EMAIL PROTECTED]> wrote: > I've made a plugin which is included in every page using > requestAction, but I need to show and hide dif

Re: Determine current action using different method than $this->name

2007-04-01 Thread gerbenzomp
Sorry, I meant controller, instead of action in the above post. On 2 apr, 02:29, "gerbenzomp" <[EMAIL PROTECTED]> wrote: > I've made a plugin which is included in every page using > requestAction, but I need to show and hide different parts of the view > depending on the current main action (the