Skip to content

Commit

Permalink
getPath should work for themes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominick Johnson committed Apr 16, 2024
1 parent 87567eb commit 97f661e
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions src/Template/Name.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,19 +169,7 @@ public function getFile()
*/
public function getPath()
{
if (is_null($this->folder)) {
return "{$this->getDefaultDirectory()}/{$this->file}";
}

$path = "{$this->folder->getPath()}/{$this->file}";

if (
!is_file($path)
&& $this->folder->getFallback()
&& is_file("{$this->getDefaultDirectory()}/{$this->file}")
) {
$path = "{$this->getDefaultDirectory()}/{$this->file}";
}
$path = ($this->engine->getResolveTemplatePath())($this);

return $path;
}
Expand Down

0 comments on commit 97f661e

Please sign in to comment.