make title configurable
authorChristian Weiske <cweiske@cweiske.de>
Wed, 18 Apr 2012 17:23:30 +0000 (19:23 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Wed, 18 Apr 2012 17:23:30 +0000 (19:23 +0200)
data/config.default.php
data/templates/base.htm
www/www-header.php

index e8c3d80b8ecf6267614ade68e9677d3abf0a186e..1b8e39b71218f04dd6de18e7d2f81c1decdb9a93 100644 (file)
@@ -5,6 +5,7 @@ $GLOBALS['phorkie']['cfg'] = array(
     'workdir' => __DIR__ . '/../repos/work/',
     'tpl'     => __DIR__ . '/templates/',
     'css'     => 'http://twitter.github.com/bootstrap/assets/css/bootstrap.css',
     'workdir' => __DIR__ . '/../repos/work/',
     'tpl'     => __DIR__ . '/templates/',
     'css'     => 'http://twitter.github.com/bootstrap/assets/css/bootstrap.css',
+    'title'   => 'phorkie',
 );
 $GLOBALS['phorkie']['tools'] = array(
     '\\phorkie\\Tool_Xmllint' => true,
 );
 $GLOBALS['phorkie']['tools'] = array(
     '\\phorkie\\Tool_Xmllint' => true,
index 879635b8ebb86ce9f14cd373023ef1923f673d6f..6dfb15a82599010855cff9d24d39f9db713fe5b5 100644 (file)
@@ -4,7 +4,7 @@
  <head>
   <link rel="stylesheet" href="{{css}}"/>
   <link rel="stylesheet" href="/phorkie.css" />
  <head>
   <link rel="stylesheet" href="{{css}}"/>
   <link rel="stylesheet" href="/phorkie.css" />
-  <title>{% block title %}{% endblock %} - phorkie</title>
+  <title>{% block title %}{% endblock %} - {{title}}</title>
   <script src="/jquery-1.7.2.min.js"></script>
   <script src="/phorkie.js"></script>
  </head>
   <script src="/jquery-1.7.2.min.js"></script>
   <script src="/phorkie.js"></script>
  </head>
@@ -13,7 +13,7 @@
    <div class="navbar-inner">
     <div class="container">
      <a class="brand" href="/">
    <div class="navbar-inner">
     <div class="container">
      <a class="brand" href="/">
-      phorkie
+      {{title}}
      </a>
      <ul class="nav">
       <li>
      </a>
      <ul class="nav">
       <li>
index 0a3b5628ce0d9c2e33c413b6b5e73a3a1c415fb0..756bdc97f936cabb95b0bfffae5c92c77c2fbd50 100644 (file)
@@ -52,6 +52,8 @@ $twig = new \Twig_Environment(
 function render($tplname, $vars)
 {
     $vars['css'] = $GLOBALS['phorkie']['cfg']['css'];
 function render($tplname, $vars)
 {
     $vars['css'] = $GLOBALS['phorkie']['cfg']['css'];
+    $vars['title'] = $GLOBALS['phorkie']['cfg']['title'];
+
     $template = $GLOBALS['twig']->loadTemplate($tplname . '.htm');
     echo $template->render($vars);
 }
     $template = $GLOBALS['twig']->loadTemplate($tplname . '.htm');
     echo $template->render($vars);
 }