Widget system: Difference between revisions

no edit summary
Tag: 2017 source edit
No edit summary
Tag: 2017 source edit
 
(2 intermediate revisions by one other user not shown)
Line 4: Line 4:
[[fr:Système_des_Widgets]]
[[fr:Système_des_Widgets]]
[[es:Sistema_de_paneles]]
[[es:Sistema_de_paneles]]
[[de:System fuer Wigets]]
[[zh:信息框]]
[[zh:信息框]]
<!-- END interlang links -->
<!-- END interlang links -->
Line 30: Line 31:
* Create your box file into '''htdocs/mymodule/core/boxes/'''
* Create your box file into '''htdocs/mymodule/core/boxes/'''
* Once your module descriptor is created, add these lines to declare your box file
* Once your module descriptor is created, add these lines to declare your box file
<source lang="php">
<syntaxhighlight lang="PHP">
$this->boxes = array(
$this->boxes = array(
     0 => array(
     0 => array(
Line 39: Line 40:
     // You can declare as much boxes as you want by simply incrementing the index.
     // You can declare as much boxes as you want by simply incrementing the index.
);
);
</source>
</syntaxhighlight>
* For distribution, package the module containing your box (See [[Module development]] page).
* For distribution, package the module containing your box (See [[Module development]] page).


= [[File:art.png]] Activate a box =
= [[File:art.png]] Activate a widget =


To activate a box, go to '''Home - Setup - Boxes''' page and click activate on the box you want to see.
To activate a box, go to '''Home - Setup - Boxes''' page and click activate on the box you want to see.


It will be displayed on the page for which you have activated the box.
It will be displayed on the page for which you have activated the box.
265

edits