i have modules in a layout! i want use them in a website.
What should I do ? so they can work together.look like widgets
$this->widget("application.widgets.PtttWidget");
plase help me!
thanks very much!
i have modules in a layout! i want use them in a website.
What should I do ? so they can work together.look like widgets
$this->widget("application.widgets.PtttWidget");
plase help me!
thanks very much!
Why you not create widgets and then use them inside of your modules?
thank you very much!
i see ! but i want add modules on a website. .do you know way?
If you want to call your widget italianjob (<?php $this->widget(‘ext.italianjob’); ?>) you have to create a folder called italianjob in the extensions folder:
/protected/extensions/italianjob
then, you can create a php class for your widget:
class ClassName extends CWidget {
}
and then, you can write you init method:
class ClassName extends CWidget {
public function init() {
echo "I am a widget";
}
}
To call this widget you have to write: <?php $this->widget(‘ext.italianjob.ClassName’); ?>
thank you very much!!! i will try