Thanks Modi,
I read the tutorials and created my Widget in extension folder.
the following thinks i have done.
Create a widget view in extensions/widget/login/views/hloginForm.php with this codes
<?php echo CHtml::beginForm($this->url, 'post', $this->htmlOptions); ?>
<div class="form header">
<table>
<tr>
<td>
<div class="row">
<?php echo $form->labelEx($model,'username'); ?>
<?php echo $form->textField($model,'username',array('class'=>'txt')); ?>
<?php echo $form->error($model,'username'); ?>
</div>
<div class="row rememberMe">
<?php echo $form->checkBox($model,'rememberMe'); ?>
<?php echo $form->label($model,'rememberMe',array('class'=>'dull')); ?>
<?php echo $form->error($model,'rememberMe'); ?>
</div>
</td>
<td>
<div class="row">
<?php echo $form->labelEx($model,'password'); ?>
<?php echo $form->passwordField($model,'password',array('class'=>'txt')); ?>
<?php echo $form->error($model,'password'); ?>
</div>
<div class="row">
<?php echo $form->label($model,'Forget Password?',array('class'=>'dull')); ?>
</div>
</td>
<td>
<div class="row"> </div>
<div class="row">
<?php echo CHtml::submitButton('Login',array('class'=>'logbtn')); ?>
</div>
</td>
</tr>
</table>
</div><!-- form -->
<?php echo CHtml::endForm(); ?>
and created a Login.php in main widget folder
(that is : application/extensions/widget/login/login.php) with the code like :
<?php
class Login extends CWidget
{
public function run()
{
$this->render('hloginForm');
}
}
?>
and made all extensions as autoload in config/main.php
as
'import'=>array(
...
'application.extensions.*',
),
then try to use it in my webpage view file as
<?php $this->widget('Login'); ?>
this throw me this error
Tell me whats Wrong??? What should i do to get my Widget in my page.
and once i tried this
$this->widget('application.extensions.widget.login.Login', array());
i got this error