Beispiel #1
0
    <h1><?php 
echo documentation_page_name($page);
?>
</h1>

<?php 
site_include_view('_support/_general/' . $page . '.php');
documentation_related($page);
Beispiel #2
0
 * Support
 */
Flight::route('/documentation/(@type)(/@page)/', function ($type = '', $page = '') {
    $layout = '';
    site_breadcrumb_add('Support', 'documentation/');
    if ($type == '' && $page == '') {
        $layout = '_support/index.php';
    }
    if (documentation_type_exists($type)) {
        $layout = '_support/archive.php';
        site_breadcrumb_add(documentation_type_name($type), 'documentation/' . $type . '/');
        site_title(sprintf('%s Help - Pro Theme Design', documentation_type_name($type)));
        if (documentation_page_exists($page, $type)) {
            $layout = '_support/type-' . $type . '.php';
            site_breadcrumb_add(documentation_page_name($page), 'documentation/' . $type . '/' . $page . '/');
            site_title(sprintf('%s Help', documentation_page_name($page)));
        } else {
            if (!empty($page)) {
                $page = '';
                $layout = '';
            }
        }
    } else {
        // reset just in case
        $type = '';
        $page = '';
    }
    if (empty($layout)) {
        Flight::notFound();
    }
    site_popover(true);