mirror of
https://github.com/danpros/htmly.git
synced 2026-04-20 12:36:23 +05:30
Include functions.php
If there is functions.php inside themes root, include it.
This commit is contained in:
parent
6c821dd398
commit
5adfd66d50
4 changed files with 11 additions and 6 deletions
|
|
@ -380,8 +380,13 @@ function render($view, $locals = null, $layout = null)
|
|||
|
||||
if (($view_root = config('views.root')) == null)
|
||||
error(500, "[views.root] is not set");
|
||||
|
||||
$fnc = "{$view_root}/functions.php";
|
||||
|
||||
ob_start();
|
||||
if (file_exists($fnc)) {
|
||||
include $fnc;
|
||||
}
|
||||
include "{$view_root}/{$view}.html.php";
|
||||
content(trim(ob_get_clean()));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue