@@ -114,11 +114,15 @@ public function resolveThemePath($file, $handler = false) : string {
114
114
} else {
115
115
$ theme = sprintf ('%1$s%2$sthemes%2$s%4$s%2$s%3$s.php ' , $ this ->path , DS , $ file , $ this ->theme );
116
116
}
117
+
118
+ if (!file_exists ($ theme )) {
119
+ $ theme = sprintf ('%1$s%2$s%4$s%2$s%3$s.php ' , $ this ->path , DS , $ file , $ entry );
120
+ }
117
121
118
122
if (!file_exists ($ theme )) {
119
123
$ theme = sprintf ('%1$s%4$s%2$s%3$s.php ' , PATH , DS , $ file , $ entry );
120
124
}
121
-
125
+
122
126
return $ theme ;
123
127
}
124
128
@@ -152,7 +156,7 @@ public function assign(string $name, mixed $value) : void {
152
156
public function display (string $ file , array $ arguments = [], bool $ basedir = true , bool $ once = true ) : ?bool {
153
157
$ template = $ this ;
154
158
$ functions = $ this ->resolveThemePath ('functions ' );
155
-
159
+
156
160
if (file_exists ($ functions )) {
157
161
if ($ once ) {
158
162
require_once ($ functions );
@@ -223,7 +227,7 @@ public function header() : void {
223
227
224
228
public function footer () : void {
225
229
$ template = $ this ;
226
- $ path = $ this ->resolveThemePath ('footer ' );
230
+ $ path = $ this ->resolveThemePath ('footer ' );
227
231
228
232
foreach ($ this ->assigns AS $ name => $ value ) {
229
233
$ {$ name } = $ value ;
0 commit comments