If the model where pass as object to the view instead of array you would 
use it right away.
For now i think you either set it in the controller or write it in the 
view, either inline if its very trivial (i think count($comments) count 
as it) or inside a custom helper.

Or if its very trivial, have a  inside the view.

I think the best way would be to use a custom helper in the view.
$custom->countComment($comments)

[EMAIL PROTECTED] wrote:
> Sorry to once again start another new thread but im having trouble
> finding where i should put functions to which i would use inside the
> view.
>
> I wish to create a countComment($post_id) function that will do... well
> what it says on the tin and return a count of the comments for the
> $post_id given.
>
> Would this function go in the model? and if so how do a reference it in
> the view?
>
> I also have a number of formatting functions i will be creating that
> will need to take data, change it then return it back.
>
> Im assume these should go in the model as well? or should i be creating
> these as components?
>
>
> >
>
>   


-- 
Mathieu Gagnon, programmation web
2649 Bourbonnière appt. 6    Tel.: (514) 256-9437
Montréal (Québec) H1W 3P5    Courriel.: [EMAIL PROTECTED]


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to