Use the .twig file extension
This commit is contained in:
parent
3405291db1
commit
2a1af73f75
11 changed files with 7 additions and 7 deletions
|
@ -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`
|
||||||
|
|
||||||
|
|
|
@ -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) {
|
||||||
}
|
}
|
||||||
|
|
|
@ -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`
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue