Browse Source

make it possible to reference own templates in main.cfg

master
Dom SP 3 years ago
parent
commit
91057267f4
4 changed files with 4 additions and 1 deletions
  1. +1
    -0
      .gitignore
  2. +1
    -1
      app/controller/page.php
  3. +1
    -0
      index.php
  4. +1
    -0
      main.cfg.sample

+ 1
- 0
.gitignore View File

@@ -12,3 +12,4 @@ content/
php-error.log
rsc/sass/_onthefly.scss
rsc/themes/
templates/

+ 1
- 1
app/controller/page.php View File

@@ -18,7 +18,7 @@ class Page {
case 'home':
default:
$f3->mset(array(
'template'=>'tpl/index.html',
'template'=>$f3->get('template') ? :'tpl/index.html',
'templateContent'=>'maincontent.html'
));
self::folder2();

+ 1
- 0
index.php View File

@@ -92,6 +92,7 @@ $f3->set('CONTENT', $content_dir);
$f3->set('CONTENT_BASE', array_shift(explode("/",$f3->get('CONTENT'))).'/');

$f3->set('UI', implode(';', array(
ROOT.$f3->get('templatepath'),
ROOT.'app/views/',
ROOT.$f3->get('CONTENT_BASE') // content folders can contain .html templates
)));

+ 1
- 0
main.cfg.sample View File

@@ -45,6 +45,7 @@ content.en=content/EN/
;public directory for css, javascript, images etc.
RESOURCES=rsc/
;default site template:
templatepath=app/views/
template=tpl/index.html
theme=style.css
themepath=./

Loading…
Cancel
Save