public function actionAdd()
 {
     $model = new AddPageForm();
     $model->availableTypes = Page::getPageTypes();
     if ($model->load(Yii::$app->request->post()) && $model->validate()) {
         return $this->redirect(['edit', 'type' => $model->type]);
     }
     return $this->render('add', ['model' => $model]);
 }
</div>
    <div class="panel-body">

        <?php 
echo Html::a(Yii::t('CustomPagesModule.base', 'Create new Page'), ['add'], array('class' => 'btn btn-primary'));
?>

        <p />
        <p />

        <?php 
if (count($pages) != 0) {
    ?>
            <?php 
    $classes = Page::getNavigationClasses();
    $types = Page::getPageTypes();
    ?>
            <table class="table">
                <tr>
                    <th><?php 
    echo Yii::t('CustomPagesModule.base', 'Title');
    ?>
</th>
                    <th><?php 
    echo Yii::t('CustomPagesModule.base', 'Navigation');
    ?>
</th>
                    <th><?php 
    echo Yii::t('CustomPagesModule.base', 'Type');
    ?>
</th>