3164 - Важно - скрытие позиций английской версии

parent 02adae31
<?php
use \common\modules\content\models\CoContent;
use common\modules\content\models\CoContentLang;
use yii\helpers\Html;
use yii\helpers\Url;
use common\modules\cases\models\CaseContent;
use common\modules\cases\models\CasesPreviewType;
//$models = CoContent::find()
$models = CaseContent::find()
->where([
'category_id' => \common\models\Settings::getValue('case-category-id'),
'active' => true
])
->orderBy('position DESC')
->all();
->alias('c')
->leftJoin(CoContentLang::tableName() . ' cl', 'c.id = cl.content_id')
->where([
'c.category_id' => \common\models\Settings::getValue('case-category-id'),
'c.active' => true,
'cl.hidden' => false
])
->orderBy('position DESC')
->all();
?>
<?php if($models) : ?>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment