Пример #1
0
                    <?php 
foreach (ArrayHelper::map(CatalogProducts::findAll(['parent' => 0, 'isparent' => true, 'status' => CatalogProducts::STATUS_PUBLISHED]), 'id', 'name') as $category_id => $category_name) {
    ?>
                    <li class="active grid"><a  href="#"><?php 
    echo $category_name;
    ?>
</a>
                        <div class="megapanel">
                            <div class="row">
                                <div class="col1">
                                    <div class="h_nav">
                                        <ul>
                                            <?php 
    $count = CatalogProducts::find()->where(['parent' => $category_id, 'isparent' => true, 'status' => CatalogProducts::STATUS_PUBLISHED])->count() / 2;
    $i = 0;
    foreach (ArrayHelper::map(CatalogProducts::findAll(['parent' => $category_id, 'isparent' => true, 'status' => CatalogProducts::STATUS_PUBLISHED]), 'id', 'name') as $element_id => $element_name) {
        ?>
                                                    <?php 
        if ($i++ >= $count) {
            ?>
                                                        </ul>
                                                        </div>
                                                        </div>
                                                        <div class="col1">
                                                        <div class="h_nav">
                                                        <ul>
                                                    <?php 
            $count = 0;
        }
        ?>
                                                    <li><?php 
Пример #2
0
 relative f_xs_none m_xs_bottom_5"><?php 
echo Html::a('<b>Главная</b>', Yii::$app->homeUrl, ['class' => 'tr_delay_hover color_light tt_uppercase']);
?>
</li>
                    <li class="<?php 
echo Yii::$app->request->url === Url::to(['/content/site/view-by-url', 'url' => 'о-нас', 'view' => 'view']) ? 'current' : '';
?>
 relative f_xs_none m_xs_bottom_5"><?php 
echo Html::a('<b>О нас</b>', ['/content/site/view-by-url', 'url' => 'о-нас', 'view' => 'view'], ['class' => 'tr_delay_hover color_light tt_uppercase']);
?>
</li>
                    <li class="relative f_xs_none m_xs_bottom_5"><a href="#" class="tr_delay_hover color_light tt_uppercase"><b>Каталог товаров</b></a>
                        <div class="sub_menu_wrap top_arrow d_xs_none type_2 tr_all_hover clearfix r_corners">
                            <ul class="sub_menu">
                                <?php 
foreach (CatalogProducts::findAll(['parent' => 0, 'isparent' => true, 'status' => CatalogProducts::STATUS_PUBLISHED]) as $model) {
    ?>
                                    <?php 
    echo Html::tag('li', Html::a($model->name, ['/catalog/site/index', 'parent' => $model->id], ['class' => 'color_dark tr_delay_hover']));
    ?>
                                <?php 
}
?>
                            </ul>
                        </div>
                    </li>
                    <li class="relative f_xs_none m_xs_bottom_5"><a href="#" class="tr_delay_hover color_light tt_uppercase"><b>Наши услуги</b></a>
                        <!--sub menu-->
                        <div class="sub_menu_wrap top_arrow d_xs_none type_2 tr_all_hover clearfix r_corners">
                            <ul class="sub_menu">
                                <?php