fixed
All checks were successful
Build and push / Pulling repo on server (push) Successful in 19s
All checks were successful
Build and push / Pulling repo on server (push) Successful in 19s
This commit is contained in:
@ -94,20 +94,14 @@ class Page
|
||||
function renderPagecontent()
|
||||
{
|
||||
$controller_dir = ROOT . DS . 'pages' . DS . $this->_controller . DS;
|
||||
/*$partials = [];
|
||||
if(is_dir($controller_dir.'partials'))
|
||||
$partials[] = new Mustache_Loader_FilesystemLoader($controller_dir.'partials');
|
||||
$partials[] = new Mustache_Loader_FilesystemLoader(ROOT.DS.DS.'templates'.DS.'partials');
|
||||
$m = new Mustache_Engine(array(
|
||||
'entity_flags' => ENT_QUOTES,
|
||||
'partials_loader' => new Mustache_Loader_CascadingLoader($partials)
|
||||
));
|
||||
$this->variables['translate'] = function($value) { return translate($value); };
|
||||
$m = $this->addHelpers($m);*/
|
||||
|
||||
//when the template path starts with a / it is relative to the root of the project
|
||||
if($this->variables['template'][0]=='/')
|
||||
$this->variables['template'] = '../../'.$this->variables['template'];
|
||||
if($this->variables['template'] && file_exists(ROOT . DS . 'pages' . DS . $this->_controller . DS . $this->variables['template']))
|
||||
$templatefile = ROOT . DS . 'pages' . DS . $this->_controller . DS . $this->variables['template'];
|
||||
|
||||
|
||||
//render template by running include
|
||||
ob_start();
|
||||
extract($this->variables);
|
||||
|
Reference in New Issue
Block a user