Exemplo n.º 1
0
            </div><!-- header -->

            <div id="cssmenu">
                
                <ul>
                    <li><?php 
echo CHtml::link("Inicio", array('/site/index'));
?>
</li>
                    <li class='has-sub '><?php 
echo CHtml::link("Secciones", array('/secciones/index'));
?>
                        <ul>
                            <?php 
$secciones = Secciones::model()->findAll();
foreach ($secciones as $sec) {
    ?>
                                    <li><?php 
    echo CHtml::link($sec->nombre, array('/secciones/view', 'id' => $sec->idSeccion));
    ?>
</li>
                                    <?php 
}
?>
                        </ul>
                    </li>
                    <li>
                        <?php 
echo CHtml::link("Contacto", array('/site/contact'));
?>
Exemplo n.º 2
0
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer the ID of the model to be loaded
  */
 public function loadModel($id)
 {
     $model = Secciones::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'La página solicitada no existe.');
     }
     return $model;
 }
Exemplo n.º 3
0
    <div class="row">
        <?php 
echo $form->labelEx($model, 'tags');
?>
        <?php 
echo $form->textField($model, 'tags', array('size' => 50, 'maxlength' => 50));
echo $form->error($model, 'tags');
?>
    </div>

    <div class="row">
        <?php 
echo $form->labelEx($model, 'secciones_idSeccion');
?>
        <?php 
echo $form->dropDownList($model, 'secciones_idSeccion', CHtml::listData(Secciones::model()->findAll(), 'idSeccion', 'nombre'), array('empty' => array(NULL => '-- Seleccione --')));
echo $form->error($model, 'secciones_idSeccion');
?>
    </div>

    <div class="row buttons">
<?php 
echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save');
?>
    </div>

<?php 
$this->endWidget();
?>

</div><!-- form -->