Widget system: Difference between revisions

Jump to navigation Jump to search
no edit summary
(Tried to clarify some terms)
No edit summary
Tag: 2017 source edit
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<!-- BEGIN origin interlang links -->
<!-- You can edit this section but do NOT remove these comments
    Links below will be automatically replicated on translated pages by PolyglotBot -->
[[fr:Système_des_Widgets]]
[[es:Sistema_de_paneles]]
[[de:System fuer Wigets]]
[[zh:信息框]]
<!-- END interlang links -->
[[Category:Core]]
[[Category:Core]]
{{TemplateDocDevEn}}
{{TemplateDocDevEn}}
Line 6: Line 15:
Boxes content is left to the developer's imagination (graphics, text, tables, …) but a basic framework allows for easy table based presentation.
Boxes content is left to the developer's imagination (graphics, text, tables, …) but a basic framework allows for easy table based presentation.


= [[File:art.png]] Create a new box =
= [[File:art.png]] Create a new Widget =


Every standard box is stored inside the '''htdocs/core/boxes''' directory.
Every standard box is stored inside the '''htdocs/core/boxes''' directory.
Line 22: 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 31: 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

Navigation menu