mirror of
https://github.com/friendica/friendica
synced 2025-04-28 03:10:11 +00:00
Merge pull request #8545 from nupplaphil/bug/subdir
Template Engine with Subdirectory
This commit is contained in:
commit
1b0a8ec5c0
4 changed files with 17 additions and 8 deletions
|
@ -99,19 +99,18 @@ class Renderer
|
|||
* Load a given template $s
|
||||
*
|
||||
* @param string $s Template to load.
|
||||
* @param string $root Optional.
|
||||
* @param string $subDir Subdirectory (Optional)
|
||||
*
|
||||
* @return string template.
|
||||
* @throws Exception
|
||||
*/
|
||||
public static function getMarkupTemplate($s, $root = '')
|
||||
public static function getMarkupTemplate($s, $subDir = '')
|
||||
{
|
||||
$stamp1 = microtime(true);
|
||||
$a = DI::app();
|
||||
$t = self::getTemplateEngine();
|
||||
|
||||
try {
|
||||
$template = $t->getTemplateFile($s, $root);
|
||||
$template = $t->getTemplateFile($s, $subDir);
|
||||
} catch (Exception $e) {
|
||||
echo "<pre><b>" . __FUNCTION__ . "</b>: " . $e->getMessage() . "</pre>";
|
||||
exit();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue