What are widgets? Read this.
Inside Gentics Portal.Node PHP widgets can be only created inside the folder modules.
1 New Widget
Before creating a widget you need to create a module for it.
Then create a PHP-file
class TestWidget extends BaseWidget { public function run() { $this->render('TestWidget'); } }
All widgets inside Gentics Portal.Node PHP must inherit from BaseWidget class. It contains basic logic for working.
Then we need a view for this widget.
Create PHP-file
The new widget can be used in any CMS page (but it will only be rendered after publishing of CMS)
<?php $this->widget('test.widgets.TestWidget'); ?>
More about views you can read here