Maybe $this->Model->data['site'].......

On Oct 30, 1:55 am, Sharkoon <[EMAIL PROTECTED]> wrote:
> I want to do some with afterFind();
>
> What I want is do a find();
> and then:
>
> function afterFind($results){
>         foreach($results as $result){
>                 $result['Page']['title'] = str_replace('{site_name}', 
> $this->site['title'], $result['Page']['title']);
>
>                 $result['Page']['content'] = str_replace('{site_name}', $this-
>
> >site['title'], $result['Page']['content']);
>         }
> }
>
> Now i'm getting an error: Undefined property:  Page::$site [CORE
> \app_site\models\page.php
>
> >From app_controller i set:
>
> $this->site['title'] = 'blabla';
>
> How to get $this->site['title'] from app_controller into my model?


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to