[eluser]Ickes[/eluser]
Continuing my Noob education...
Example:
Have a blog module and a tutorial module.
For the sake of argument, I want the modules to appear in 3 ways.
1) A blog page that displays ONLY the blog module.
2) A tutorial page that displays ONLY the tutorial module.
3) An index page that displays the blog module & the tutorial module.
I can take care of 1 & 2 really easy. The _view for each looks something like this BUT in SEPARATE views:
Code:
//BLOG VIEW -> blog_view.php
<h2><?php echo $blog_title;?></h2>
<p><?php echo $blog_article;?></p>
//TUTORIAL VIEW -> tutorial_view.php
<h2><?php echo $tutorial_title;?></h2>
<p><?php echo $tutorial_article;?></p>
For #3, I can simply copy and paste that in one index_view.php. However, this gets complicated when I add more things such as author, email, date created, comments, etc. It also reuses a ton of code. So how is this normally done?
Before MVC, I would simply have a file named blog.php and tutorial.php. To accomplish #3, I would just php include them both. I assume there is an easy way to do so in MVC but I am struggling with the change in thought.
Any help is appreciated. Thanks.