|
|
|
@ -20,6 +20,25 @@ class Themes
|
|
|
|
|
return $this->themes;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getCustomIndex()
|
|
|
|
|
{
|
|
|
|
|
$settings = (new Settings())->getSettings();
|
|
|
|
|
$currentTheme = $settings["global"]["theme"];
|
|
|
|
|
$folder = "../content/themes/" . $currentTheme;
|
|
|
|
|
$files = array_filter(glob("$folder/*twig"), "is_file");
|
|
|
|
|
$views = [];
|
|
|
|
|
|
|
|
|
|
foreach ($files as $file) {
|
|
|
|
|
$path = explode("/", $file);
|
|
|
|
|
$fileName = $path[4];
|
|
|
|
|
if (str_contains($fileName, "index")) {
|
|
|
|
|
$page = explode(".", $fileName);
|
|
|
|
|
$views[] = $page[0];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return $views;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getCustomViews()
|
|
|
|
|
{
|
|
|
|
|
$settings = (new Settings())->getSettings();
|
|
|
|
|