I have two versions of the same view, both creating the EXACT same output:
<?php $this -> renderPartial('_form', array('model' => $model), false, true); ?>
<div id="list">
<?php $this -> renderPartial('_list', array('data' => $data), false, true); ?>
</div>
In the first code example, the second call of renderPartial just hides a foreach loop wich in turn call a renderPartial for each object. But this causes the objects to appear one after another in a fairly slow way, which is NOT ok for this little amount of data.
<?php $this -> renderPartial('_form', array('model' => $model), false, true); ?>
<div id="list">
<?php foreach ($data as $model): ?>
<div id="<?php echo $model -> id; ?>">
<div class="guestview <?php echo ($model -> status ? 'inside' : 'outside'); ?>">
<?php echo $model -> name; ?>
</div>
</div>
<?php endforeach; ?>
</div>
Here in the second example everything works fine and all objects just appear at the same time… but I have another view that looks exactly like the first code example just that it does not render the ‘_form’ view and then again everything works fine even tought renderPartial is called many times, if it was for renderPartial then that code would not work as it does so what could it be?