public function actionOrganization($id) { // Все кроме текущей $orgList = Organization::loadList('*', "id != {$id}"); // Продукты организации $productList = Product::loadList('*', ['organization_id' => $id]); $model = $this->findModel($id); return $this->render('organization', ['model' => $model, 'orgList' => $orgList, 'productList' => $productList]); }
<p></p> </div> </section> <!-- /ban3 --> <!-- block1 --> <section class="block block1"> <div class="block-container"> <h1>ЛУЧШИЕ СПЕЦИАЛИСТЫ</h1> <div class="slider multiple-items3 spec"> <?php foreach ($specList as $spec) { $specId = Product::loadList('*', ['specialist_id' => $spec['id']]); ?> <div> <p> <img src="<?php echo $spec['photo_image']; ?> " alt="" style="display: inline-block; max-width: 160px; max-height: 160px; height:expression(this.scrollHeight > 160? '160px' : 'auto'); width:expression(this.scrollWidth > 160? '160px' : 'auto');" /> </p> <h3> <?php echo $spec['last_name']; ?> <br />
public function actionAbout() { return $this->render('about', ['orgList' => Organization::loadList(), 'productList' => Product::loadList(), 'specList' => Specialist::loadList()]); }