User Tools

Site Tools


how_to_create_an_admin_app

How To Create an Admin App

Admin apps are plug 'n play. An app is defined by a folder named .app for suffix e.g. admin/myapp.app/. Inside the folder you need to create a configuration file config.inc.php that defines the app and pages inside it. See below for an example.

admin/myapp.app/config.inc.php
  return [
    'name' => 'My App',
    'default' => 'example', // The default page to display when opening the app
    'priority' => 0,
    'theme' => [
      'color' => '#999999',
      'icon' => 'fa-star', // Fonticon
    ],
 
  // Submenu items (optional)
    'menu' => [
      [
        'title' => 'Example page',
        'doc' => 'example',
      ],
      //...
    ],
 
  // Mapped docs to files
    'docs' => [
      'example' => 'example.inc.php',
    ],
  ];
admin/myapp.app/example.inc.php
  <h1><?php echo $app_icon; ?> My App</h1>
  <p>Lorem ipsum dolor</p>

See Also

how_to_create_an_admin_app.txt · Last modified: 2021/05/14 01:26 by tim