fixed template rendering
fixed asset controller
This commit is contained in:
parent
c33bb4cb3a
commit
a087af311c
5 changed files with 9 additions and 12 deletions
|
|
@ -53,9 +53,6 @@ class Language
|
|||
if (!isset($this->languages[$this->language])) {
|
||||
return $key;
|
||||
}
|
||||
if (isset($this->languages[$this->language][$key])) {
|
||||
return $this->languages[$this->language][$key];
|
||||
}
|
||||
return $key;
|
||||
return $this->languages[$this->language][$key] ?? $key;
|
||||
}
|
||||
}
|
||||
|
|
@ -61,7 +61,7 @@ class Asset
|
|||
usort($this->jsFiles, function ($a, $b) {
|
||||
return $a['pos'] <=> $b['pos'];
|
||||
});
|
||||
$theme = $this->getPath('/theme/' . Config::getInstance()->getRenderer()['theme'] . '/js/');
|
||||
$theme = $this->getPath('/theme/' . Config::getInstance()->getRenderer()->theme . '/js/');
|
||||
foreach ($this->jsFiles as $key => $file) {
|
||||
echo '<script src="' . $theme . $file['file'] . '" id="js-' . $key . '"></script>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,6 +25,6 @@ class TestController implements RenderController
|
|||
|
||||
public function getTemplate(): string
|
||||
{
|
||||
return 'base.php';
|
||||
return 'base';
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue