Re: Access the model name from a view

2009-07-20 Thread jordicakephp
Thanks a lot, grigri. Your trick worked perfectly and I didn't know I can access the parameters of a view in the same way I access the parameters of a controller. What a disaster! Regards. On 20 jul, 14:19, grigri wrote: > How about > > $modelName = key($this->params['paging']); > > That shou

Re: Access the model name from a view

2009-07-20 Thread grigri
How about $modelName = key($this->params['paging']); That should do the trick. hth grigri On Jul 20, 11:47 am, jordicakephp wrote: > Hi again, my dear baker friends. > > Until now, when I've written this in a controller: > > $paginatedQuery = $this->paginate($this->modelClass); > > I've coded

Access the model name from a view

2009-07-20 Thread jordicakephp
Hi again, my dear baker friends. Until now, when I've written this in a controller: $paginatedQuery = $this->paginate($this->modelClass); I've coded this in a view to access the information that it returns (inside a foreach loop, of course): $row['ModelName']['user_login'] That is, hard-c