Re: Including an element many times in a page

2012-06-25 Thread stork
Every render of layout/view/element creates (and destroys) one output 
buffer, so for many iterations where you want to render some element, it is 
better to create custom helper.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Including an element many times in a page

2012-06-25 Thread Poyan Nabati
This question is more about code design / code smell than a practical 
solution. 

I have a page where I list some tabular data. 

*Is it poor design to store the presentation of a single row in an element, 
and then for each row in that table display that element, passing different 
data to it each time?*

I'm not sure how Cake handles it behind the curtains, will it create a 
significant performance hit? One of the reasons I thought it was a good 
idea was that then I could dynamically load new rows using ajax and just 
call that element.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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