Beispiel #1
0
 public function inspectPanelOptions()
 {
     $root = kirby()->roots()->index() . DS . '/panel';
     require_once $root . DS . '/app/bootstrap.php';
     $panel = new Kirby\Panel(kirby(), $root);
     $this->inspectOptions($panel->defaults());
 }
Beispiel #2
0
function panel()
{
    return Kirby\Panel::instance();
}
    // load the custom config
    require $index . DS . 'site.php';
} else {
    // create a new kirby object
    $kirby = kirby();
}
// fix the base url for the kirby installation
if (!isset($kirby->urls->index)) {
    $kirby->urls->index = dirname($kirby->url());
}
// the default index directory
if (!isset($kirby->roots->index)) {
    $kirby->roots->index = $index;
}
// the default avatar directory
if (!isset($kirby->roots->avatars)) {
    $kirby->roots->avatars = $index . DS . 'assets' . DS . 'avatars';
}
// the default thumbs directory
if (!isset($kirby->roots->thumbs)) {
    $kirby->roots->thumbs = $index . DS . 'thumbs';
}
try {
    // create the panel object
    $panel = new Kirby\Panel($kirby, __DIR__);
    // launch the panel
    echo $panel->launch();
} catch (Exception $e) {
    // load the fatal screen
    echo tpl::load(__DIR__ . DS . 'app' . DS . 'layouts' . DS . 'fatal.php', array('css' => url::index() . '/assets/css/panel.css', 'content' => $e->getMessage()));
}