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

parent daf09821
<?php
use \common\modules\content\models\CoContent;
use common\modules\content\models\CoContentLang;
use common\modules\languages\models\Languages;
use yii\helpers\Html;
use yii\helpers\Url;
use common\modules\cases\models\CaseContent;
......@@ -7,11 +9,15 @@ use common\modules\cases\models\CasesPreviewType;
$models = CaseContent::find()
->alias('c')
->leftJoin(CoContentLang::tableName() . ' cl', 'c.id = cl.content_id')
->where([
'category_id' => 6,
'active' => true
'c.category_id' => 6,
'c.active' => true,
'cl.hidden' => false,
'cl.lang_id' => Languages::getCurrent()->id
])
->orderBy(['position' => SORT_ASC])
->orderBy(['c.position' => SORT_ASC])
->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