Welcome Guest, Not a member yet? Register   Sign In
MVC Style Question... put data in view vs controller
#2

[eluser]mddd[/eluser]
Stuff that you output should be in a view. Don't you agree this code is more legible than what you pasted above?
Code:
<div class="case1">

<h2>Lunch at Blue Rice Ski Resort</h2>

&lt;?=image_asset('scenario/blue_rice_trail.png','',array('class' =>'float_center'))?&gt;

<p>The Blue Rice trail is crowded by skiers when suddenly, from the north side of Snow Rice, a big thunder is heard and a white cloud rises...</p>
<p>SLAB AVALANCHE!</p>
<p>Not far from the Blue Rice trail, around 50 skiers are having a lunch in a shelter beside the ski run.</p>

&lt;?=image_asset('scenario/avalanche_1.png','',array('class' =>'float_left')?&gt;
&lt;?=image_asset('scenario/avalanche_2.png','',array('class' =>'float_right'))?&gt;

<div class="clearer"></div>

<p>Loose snow avalanche!!!!</p>
<p>The avalanche roared down crushing one of the shelter's walls and covering the shelter with up to 3 meters of snow. Many of the people made it out of the shelter on their own, but others had to be assisted.</p>

</div>

&lt;?php
$questions->_print_scenario_question($scenario_questions[0], $html_quiz, $ans_key);
$questions->_print_scenario_question($scenario_questions[1], $html_quiz, $ans_key);
$questions->_print_scenario_question($scenario_questions[2], $html_quiz, $ans_key);
?&gt;


Messages In This Thread
MVC Style Question... put data in view vs controller - by El Forum - 08-16-2010, 11:24 PM
MVC Style Question... put data in view vs controller - by El Forum - 08-17-2010, 12:17 AM
MVC Style Question... put data in view vs controller - by El Forum - 08-17-2010, 01:38 AM
MVC Style Question... put data in view vs controller - by El Forum - 08-18-2010, 09:51 AM



Theme © iAndrew 2016 - Forum software by © MyBB