demo update
All checks were successful
Build and push / Pulling repo on server (push) Successful in 2s

This commit is contained in:
2023-10-26 16:41:33 +02:00
parent 12c11b65ba
commit c3fbb0fc67
10 changed files with 38 additions and 24 deletions

View File

@ -237,4 +237,20 @@ function pictshareUploadImage($path,$hash=false)
curl_close($request);
return $json;
}
function partial($name,$variables=[])
{
$templatefile = ROOT.DS.'templates'.DS.'partials'.DS.$name;
//render template by running include
ob_start();
if(is_array($variables))
extract($variables);
if(file_exists($templatefile))
include($templatefile);
$pagecontent = ob_get_contents();
ob_end_clean();
return $pagecontent;
}