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

php-error.log php-error.log
rsc/sass/_onthefly.scss rsc/sass/_onthefly.scss
rsc/themes/ rsc/themes/
templates/

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

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

+ 1
- 0
index.php View File

$f3->set('CONTENT_BASE', array_shift(explode("/",$f3->get('CONTENT'))).'/'); $f3->set('CONTENT_BASE', array_shift(explode("/",$f3->get('CONTENT'))).'/');


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

+ 1
- 0
main.cfg.sample View File

;public directory for css, javascript, images etc. ;public directory for css, javascript, images etc.
RESOURCES=rsc/ RESOURCES=rsc/
;default site template: ;default site template:
templatepath=app/views/
template=tpl/index.html template=tpl/index.html
theme=style.css theme=style.css
themepath=./ themepath=./

Loading…
Cancel
Save