Codeigniter: Is a view supposed to be reusable
in MVC pattern, does the view need to be reusable. Are there any
principles or points to be noted while outputting data via views.
So if i have a view with certain amount of text and a table with 3
columns, and if i would need another view with minute changes like the
text would be a little different and a table with 4 columns, so should i
use variables to store the table structure in the model itself and then
pass it to the view via the controller, or use variables to change the
flow of execution in the view, or best define a new view?
Moreover what if i have an object with the table data, is it good to use
the object in the view, use a for loop and display the data or are there
better ways? Thanks
P.S I'm new to codeigniter
No comments:
Post a Comment