From 1d0f78d59f5d88de64b787dfb17b105f9053b260 Mon Sep 17 00:00:00 2001 From: flashwave Date: Sun, 8 Mar 2015 05:47:28 +0100 Subject: [PATCH] This is probably going to break all the templates --- _sakura/config/config.php | 2 +- _sakura/sakura.php | 8 ++++++++ main/index.php | 13 ++++++------- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/_sakura/config/config.php b/_sakura/config/config.php index c1d0c7b..09a386f 100644 --- a/_sakura/config/config.php +++ b/_sakura/config/config.php @@ -24,4 +24,4 @@ $fiiConf['urls']['system'] = 'sys.iihsalf.net'; // Errata $fiiConf['etc']['localPath'] = '/var/www/flashii.net/'; $fiiConf['etc']['templatesPath'] = $fiiConf['etc']['localPath'] .'_sakura/templates/'; -$fiiConf['etc']['design'] = 'yuuno'; \ No newline at end of file +$fiiConf['etc']['design'] = 'yuuno'; diff --git a/_sakura/sakura.php b/_sakura/sakura.php index cc53f90..f3a8dcd 100644 --- a/_sakura/sakura.php +++ b/_sakura/sakura.php @@ -40,3 +40,11 @@ set_error_handler(array('Flashii\Flashii', 'ErrorHandler')); // Initialise Flashii Class $flashii = new Flashii\Flashii($fiiConf); + +// Set base page rendering data +$renderData = array( + 'sakura' => [ + 'sakura_version' => SAKURA_VERSION, + 'urls' => $fiiConf['urls'] + ] +); diff --git a/main/index.php b/main/index.php index fbba1a8..5e60a37 100644 --- a/main/index.php +++ b/main/index.php @@ -9,11 +9,10 @@ require_once('/var/www/flashii.net/_sakura/sakura.php'); // Initialise templating engine $flashii->initTwig(); +// Add page specific things +$renderData['page'] = array_merge($renderData['page'], [ + 'title' => 'Flashii Dev' +]); + // Print page contents -print $flashii->twig->render('main/index.tpl', - array( - 'sakura_version' => SAKURA_VERSION, - 'configuration' => $fiiConf, - 'pageTitle' => 'Flashii Even More Nightly :^)' - ) -); +print $flashii->twig->render('main/index.tpl', $renderData);