<?php echo $form->labelEx($model, 'mensaje'); ?> <a href="javascript:;" id="clear" class="right">Limpiar</a> <?php echo $form->textArea($model, 'mensaje', array('rows' => 6, 'class' => 'textarea')); ?> </div> <div class="variable span-5 ui-sortable"> <div class="portlet"> <div class="portlet-header">Variables</div> <div class="portlet-content"> <a href="#@phone">@phone</a> <a href="#@name">@name</a> <?php foreach (Variable::model()->findAll() as $variable) { ?> <a href="#<?php echo $variable->valor; ?> "><?php echo $variable->nombre; ?> </a> <?php } ?> </div> </div> </div> <div class="clear"></div>
/** * 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. */ public function loadModel() { if ($this->_model === null) { if (isset($_GET['id'])) { $this->_model = Variable::model()->findbyPk($_GET['id']); } if ($this->_model === null) { throw new CHttpException(404, Yii::t('App', 'The requested page does not exist.')); } } return $this->_model; }