<section class="expFacts ex-2 parallax" data-stellar-background-ratio="0.5" style="background-image: url('/img/exposition-<?php echo $model->id; ?> .jpg');"> <div class="exp-facts-slider"> <div class="container"> <div class="row"> <div id="exp-facts-btn" class="col-xs-8 col-xs-offset-2 text-center"> <img id="goToNextSlide" class="img-responsive" src="/img/btn-facts.png" onmouseover="this.src='/img/btn-facts_active.png'" onmouseout="this.src='/img/btn-facts.png'" /> </div> </div> <ul id="exp-facts-slider"> <?php $facts = Facts::model()->active()->findAll(); if ($facts) { foreach ($facts as $fact) { $src = $fact->getOrigFilePath() . $fact->image; ?> <li> <div class="row"> <div class="col-xs-12 col-sm-10 col-sm-offset-1 text-center"> <div class="exp-facts-fact"> <div class="row"> <div class="col-xs-12 col-sm-3 "> <img class="img-responsive" src="<?php echo $src; ?> " /> </div>
/** * Returns the data model based on the primary key given in the GET variable. * If the data model is not found, an HTTP exception will be raised. * @param integer $id the ID of the model to be loaded * @return Zal the loaded model * @throws CHttpException */ public function loadModel($id) { $model = Facts::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }