11-19-2007, 11:55 PM
[eluser]Chris Newton[/eluser]
I use $data['page'] to store the name (or in this case just a part of the name) of a view, so in the case of my example;
content_my_content.php
would be a view name that gets loaded into a generic view template called page.php that contains links to all of the headers & footers needed for the particular controller. So, I was talking about creating a generic view template that calls in at least one, more specific view. So, you're talking about creating a controller called page.php, and I'm talking about creating a VIEW called page.php.
My method only helps reduce the number of views you have to call in each controller if you're maintaining a lot of different view modules like i often do.
I use $data['page'] to store the name (or in this case just a part of the name) of a view, so in the case of my example;
content_my_content.php
would be a view name that gets loaded into a generic view template called page.php that contains links to all of the headers & footers needed for the particular controller. So, I was talking about creating a generic view template that calls in at least one, more specific view. So, you're talking about creating a controller called page.php, and I'm talking about creating a VIEW called page.php.
My method only helps reduce the number of views you have to call in each controller if you're maintaining a lot of different view modules like i often do.