コード例 #1
0
ファイル: seo.php プロジェクト: ndumonteil/df56
 public static function init()
 {
     $conf_file = file_get_contents(CONF_PATH . 'seo.json');
     self::$_seox = json_decode($conf_file, true);
     $p = Routing::get_request_main_route_key();
     $sp = Routing::get_request_sub_route_key();
     self::$_keys = [$p . '|' . $sp, $p . '|', '_default'];
 }
コード例 #2
0
ファイル: assets.php プロジェクト: ndumonteil/df56
 private static function _init_conf()
 {
     $conf_file = file_get_contents(CONF_PATH . 'assets.json');
     $confx = json_decode($conf_file, true);
     $route_name = Routing::get_request_main_route_key();
     foreach (['js', 'css'] as $type) {
         $global_conf = @$confx[$type]['_all'] ?: [];
         $page_conf = @$confx[$type][$route_name] ?: [];
         self::$_conf[$type] = array_merge($global_conf, $page_conf);
     }
 }
コード例 #3
0
ファイル: header.tmpl.php プロジェクト: ndumonteil/df56
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <div class="brand-container">
                    <a class="h1 color-vert brand-name" href="/accueil">
                        Depan'Fermetures 56
                    </a>
                </div>
            </div>
            <div class="navbar-collapse collapse">
                <ul class="nav navbar-nav navbar-right">
                <?php 
$active_route_name = Routing::get_request_main_route_key();
foreach (Routing::get_routes() as $route_name) {
    $menu_label = Routing::get_optx('menu_label', $route_name);
    if (!isset($menu_label)) {
        continue;
    }
    ?>
                        <li <?php 
    echo $active_route_name == $route_name ? ' class="active"' : '';
    ?>
><a href="/<?php 
    echo $route_name;
    ?>
"><?php 
    echo $menu_label;
    ?>
コード例 #4
0
ファイル: index.php プロジェクト: ndumonteil/df56
</head>
<body>
<?php 
include TMPL_PATH . 'header.tmpl.php';
?>
    <div class="container-fluid">
        <div class="row">
<?php 
$encart = Routing::get_optx('encart');
$content_col_nb = $encart ? 12 - (int) $encart['size'] : 12;
?>
            <div class="col-lg-<?php 
echo $content_col_nb;
?>
" id="<?php 
echo Routing::get_request_main_route_key();
?>
-content">
<?php 
include Routing::get_tmpl_path();
?>
            </div>
<?php 
if ($encart) {
    ?>
            <div class="visible-lg-block col-lg-<?php 
    echo (int) $encart['size'];
    ?>
">
<?php 
    include TMPL_PATH . $encart['name'] . '.encart.tmpl.php';