Hi Everybody,
I’ve made a theme from my layout by Photoshop
When I want to display an actionCreate by Widget I’ve got this problem!
Code Render:
<?php $this->widget('application.components.MainContentBox',
array('title'=>'Create Event',
'content'=>$this->renderPartial('_form', array('model'=>$model)),
));
?>
And I got this result:
2403
My Widget:
<?php
class MainContentBox extends CWidget
{
public $title;
public $content;
public function run()
{
$this->render('MainContentBox');
}
}
Views file:
<div class="main-box border-line">
<div class="main-title">
<span><?php echo $this->title ?></span>
</div>
<div class="main-content">
<br />
<?php $this->content ?>
</div>
</div>
Even I comment this line <?php $this->content ?> I still got the same result!
My CSS Code:
.border-line
{
border: 1px solid #e5e5e5;
}
.main-title
{
padding: 0 10px;
font-weight: bold;
background: #f7f7f7;
line-height: 25px;
border-bottom: 1px solid #e5e5e5;
}
.main-content {}
Do you think $this->renderPartial is so hard to display in a DIV? Help me solve this problem or Give me a new method! Thanks!