index.php 2.5 KB
<?php
/**
 * @var $this TextSectionController
 * @var $content string
 */
?>
<?php $this->renderPartial('//snippets/headerGallery'); ?>
<!-- header end-->
<div class="wrapper content-wrapper">
    <div class="col-wrapper">
        <div class="col2">
            <ul class="sidebar-nav">

                <?php
                echo '<li>', CHtml::link($this->getRootNode()->i18n->label, array('textRoot/index', 'node_id' => $this->getRootNode()->id)), '</li>';

                foreach ($this->getRootNode()->nodes as $node)
                    if (!$node->hidden) {
                        if ($node->id == $this->getNode()->id) {
                            echo '<li class="active">';
                            echo CHtml::link($node->i18n->label, array('textSection/index', 'node_id' => $node->id));
                            if (!empty($this->getRootNode()->nodes)) {
                                echo '<ul>';
                                foreach ($node->nodes as $sectionNode)
                                    if (!$sectionNode->hidden) {
                                        echo '<li>', CHtml::link($sectionNode->i18n->label, array('textPage/index', 'node_id' => $sectionNode->id)), '</li>';
                                    }
                                echo '</ul>';
                            }
                            echo '</li>';
                        } else {
                            echo '<li>',
                            CHtml::link($node->i18n->label, array('textSection/index', 'node_id' => $node->id)), '
                        </li>';
                        }
                    } ?>
            </ul>
        </div>
        <div class="col8">
            <ul class="crumbs">
                <li><?php echo CHtml::link($this->getRootNode()->i18n->label, array('textRoot/index', 'node_id' => $this->getRootNode()->id)), '</li>';?>

                </li>

            </ul>
            <h1><?php echo $this->pageName?></h1>

            <div class="text-content">
                <?php echo $content;?>
            </div>
        </div>

        <div class="col2">
            <p class="section-title"><?php echo Yii::t('site','Есть вопросы?');?></p>

            <div class="text-content">
                <?php echo Yii::t('site','Обращайтесь к вашему персональному консультанту по тюнингу!');?>
            </div>
            <?php $this->renderPartial('//snippets/sidebarContacts');?>
        </div>
    </div>
</div>