How about

$modelName = key($this->params['paging']);

That should do the trick.

hth
grigri

On Jul 20, 11:47 am, jordicakephp <jordicake...@gmail.com> 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 this in a view to access the information that it returns
> (inside a foreach loop, of course):
>
> $row['ModelName']['user_login']
>
> That is, hard-coding the name of the model in the view. My doubt is:
> How can I access, from a view, the name of its associated model? I
> haven't been able to find this answer!
>
> Again, thanks a lot in advance for your time (I promise not to write
> more messages today ;-)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to