very simple questions for you all, but I really don’t know how to handle.
controller:
class AdminController extends CController
{
/**
* Declares default action.
*/
public $defaultAction = 'Login';
/**
* Declares class-based actions.
*/
public function actions()
{
return array(
// captcha action renders the CAPTCHA image displayed on the contact page
'captcha'=>array(
'class'=>'CCaptchaAction',
'backColor'=>0xFFFFFF,
),
);
}
public function actionLogin()
{
$this->render('login');
}
}
the view file:
<p>Login From Here</p>
and the main config:
return array(
'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
'defaultController'=>'admin',
'name'=>'Administrator End'
);
the layout main is just html file with somewhere a <?php echo content; ?>
at last, I got the <p>Login From Here</p> only, and no any other pieces in layout main, that means, the login file in controller was rendred without out layouts main. How can i get the default layout main get rendered?