Skip to content

Instantly share code, notes, and snippets.

@jcalonso
Created October 25, 2012 19:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcalonso/3954752 to your computer and use it in GitHub Desktop.
Save jcalonso/3954752 to your computer and use it in GitHub Desktop.
yii _view.php
<?php
/* @var $this DailyImgController */
/* @var $data DailyImg */
?>
<div class="view">
<b><?php echo CHtml::encode($data->getAttributeLabel('id_dailiy_img')); ?>:</b>
<?php echo CHtml::link(CHtml::encode($data->id_dailiy_img), array('view', 'id'=>$data->id_dailiy_img));
$category = DailyImg::model()->with('tblCategory')->findByPk($data->id_category); // ???
?>
<br />
<b><?php echo CHtml::encode($category->tblCategory->getAttributeLabel('category_name'));//??? ?>:</b>
<?php
echo CHtml::encode($category->tblCategory->category_name);//??? ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('release_date')); ?>:</b>
<?php echo CHtml::encode($data->release_date); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('name')); ?>:</b>
<?php echo CHtml::encode($data->name); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('description')); ?>:</b>
<?php echo CHtml::encode($data->description); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('file_name')); ?>:</b>
<?php echo CHtml::encode($data->file_name); ?>
<br />
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment