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 array(
    'name' => 'My App',
    'default' => 'example', // The default page to display when opening the app
    'priority' => 0,
    'theme' => array(
      'color' => '#999999',
      'icon' => 'fa-star', // Fonticon
    ),
 
  // Submenu items (optional)
    'menu' => array(
      array(
        'title' => 'Example page',
        'doc' => 'example',
      ),
      //...
    ),
 
  // Mapped docs to files
    'docs' => array(
      'example' => 'example.inc.php',
    ),
  );
admin/myapp.app/example.inc.php
<?php
  // A bunch of fancy php logic goes here
  // ...
?>
  <h1><?php echo $app_icon; ?> My App</h1>
  <p>Lorem ipsum dolor</p>
how_to_create_an_admin_app.txt · Last modified: 2019/05/12 02:09 by 172.69.138.52