Hello,
in the controller:
$this->set('postcount', $this->Post-find('count'));
in the view:
<?php echo $postcount; ?>
Andras
On Jun 5, 2010, at 6:34 PM, saidbakr wrote:
> Hi,
>
> How could I set dynamic data in the layout?
>
> In other word, I need to place the total count of posts in the layout
> footer.
>
> My application has posts controller and post model.
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to [email protected]
> 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
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
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