[eluser]Zeeshan Rasool[/eluser]
yeah its a good question. I also face this issue usually, i did as you are doing by calling model function directly in view inside foreach loop ;-)
i know its not good but how can we show total comments of each post?
One way is that we calculate this in controller and pass all counted values in assoc array. But it means we have to execute loop twice One in controller to calculate records and second in view to print postings or records.
Any other idea will be appreciated