We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bda308a + acb4eee commit 204511bCopy full SHA for 204511b
src/Paths.php
@@ -6,19 +6,17 @@ class Paths
6
{
7
public static function getPathTemplates(): string
8
9
- $optionPath = option('leitsch.blade.templates');
+ $path = option('leitsch.blade.templates');
10
11
- if ($optionPath !== null && is_dir($optionPath)) {
12
- if (is_callable($optionPath)) {
13
- return $optionPath();
14
- }
+ if (is_callable($path)) {
+ return $path();
+ }
15
16
- $path = kirby()->roots()->index() . "/" . $optionPath;
17
- } else {
18
- $path = kirby()->root('templates');
+ if ($path !== null) {
+ return kirby()->roots()->index() . '/' . $path;
19
}
20
21
- return $path;
+ return kirby()->root('templates');
22
23
24
public static function getPathViews(): string
0 commit comments