Use the .twig file extension

This commit is contained in:
Belle Aerni 2023-01-10 00:07:20 -08:00
parent 3405291db1
commit 2a1af73f75
11 changed files with 7 additions and 7 deletions

View file

@ -28,8 +28,8 @@ Here is an example of the default theme folder structure:
- `/Themes` - `/Themes`
- `/Default` - `/Default`
- `/Templates` - `/Templates`
- `default_layout.html` - `default_layout.html.twig`
- `nav_layout.html` - `nav_layout.html.twig`
- `/Assets` - `/Assets`
- `tailwind.css` - `tailwind.css`

View file

@ -111,10 +111,10 @@ class AntCMS
$templates = AntTools::getFileList($templatePath, 'html'); $templates = AntTools::getFileList($templatePath, 'html');
try { try {
if (in_array($layout . '.html', $templates)) { if (in_array($layout . '.html.twig', $templates)) {
$template = file_get_contents(AntTools::repairFilePath($templatePath . '/' . $layout . '.html')); $template = file_get_contents(AntTools::repairFilePath($templatePath . '/' . $layout . '.html.twig'));
} else { } else {
$template = file_get_contents(AntTools::repairFilePath($defaultTemplates . '/' . $layout . '.html')); $template = file_get_contents(AntTools::repairFilePath($defaultTemplates . '/' . $layout . '.html.twig'));
} }
} catch (\Exception $e) { } catch (\Exception $e) {
} }

View file

@ -31,8 +31,8 @@ Here is an example of the default theme folder structure:
- `/Themes` - `/Themes`
- `/Default` - `/Default`
- `/Templates` - `/Templates`
- `default_layout.html` - `default_layout.html.twig`
- `nav_layout.html` - `nav_layout.html.twig`
- `/Assets` - `/Assets`
- `tailwind.css` - `tailwind.css`