How To Create A Backend Widget

Titre

OldNew
11How To Create A Backend Widget

Lien permanent

OldNew
11how_to_create_a_backend_widget

Contenu

OldNew
1# How To Create a Backend Widget
12
3Backend widgets are boxes of content that are displayed in the backend
4dashboard. Widgets are plug 'n play, meaning that if you upload a
5widget folder it is automatically loaded. A widget is defined by a
6folder named .widget at the end e.g. admin/mywidget.widget/. Inside the
7folder you need to create a configuration file config.inc.php that
8defines the widget and the file to load. See below for an example.
9
10```php admin/mywidget.widget/config.inc.php
11
12 return [
13 'name' => 'My App',
14 'file' => 'widget.inc.php', // The file to load that is holding the content
15 'priority' => 0,
16 ];
17```
18
19```php admin/mywidget.widget/widget.inc.php
20
21Hello World
22
23Lorem ipsum dolor
24```
25
26## See Also
27
28* [How to Create An Admin App](how_to_create_an_admin_app)

Modifié par litecart le 29 déc. 2023 à 04:28

Ce site n'utilise aucun cookie ni aucune technologie de suivi tierce. Nous pensons pouvoir faire mieux que les autres et nous nous soucions vraiment de votre vie privée.