Esempio n. 1
0
File: start.php Progetto: nob/joi
if ($admin_enabled !== true && strtolower($admin_enabled) != 'yes') {
    Statamic_View::set_templates(array_reverse(array("denied")));
    Statamic_View::set_layout("layouts/disabled");
    $admin_app->render(null, array('route' => 'disabled', 'app' => $admin_app));
    exit;
}
/*
|--------------------------------------------------------------------------
| Set Default Layout
|--------------------------------------------------------------------------
|
| This may be overwritten later, but let's go ahead and set the default
| layout file to start assembling our front-end view.
|
*/
Statamic_View::set_layout("layouts/default");
/*
|--------------------------------------------------------------------------
| Set Global Variables, Defaults, and Environments
|--------------------------------------------------------------------------
|
| Numerous tag variables, helpers, and other config-dependent options
| need to be loaded *before* the page is parsed.
|
*/
Statamic::setDefaultTags();
/*
|--------------------------------------------------------------------------
| Caching
|--------------------------------------------------------------------------
|
Esempio n. 2
0
        $aspect = 'visitor';
    }

    Log::error("404 - Page not found. " . $more, $aspect, "content");

    $data          = Content::get(Path::tidy(Config::getSiteRoot() . "/404"));
    $template_list = array('404');
    $response_code = 404;

    // set template and layout
    if (isset($data['_template'])) {
        $template_list[] = $data['_template'];
    }

    if (isset($data['_layout'])) {
        Statamic_View::set_layout("layouts/{$data['_layout']}");
    }

    // set up the view
    Statamic_View::set_templates(array_reverse($template_list));

    /*
    |--------------------------------------------------------------------------
    | HTTP Caching
    |--------------------------------------------------------------------------
    |
    | We'll always set the last modified header, but leave the
    | cache_expires option to people's discretion and configuration.
    |
    */