diff --git a/src/Liquid.php b/src/Liquid.php index f9d5aac..b9da452 100644 --- a/src/Liquid.php +++ b/src/Liquid.php @@ -3,6 +3,7 @@ namespace Shippinno\Template; +use League\Flysystem\Adapter\Local; use League\Flysystem\Filesystem; use Liquid\Exception\ParseException; use Liquid\Exception\RenderException; @@ -21,7 +22,12 @@ class Liquid extends Template public function __construct(Filesystem $filesystem) { parent::__construct($filesystem); - $this->liquid = new LiquidTemplate; + if ($filesystem->getAdapter() instanceof Local) { + $path = $filesystem->getAdapter()->getPathPrefix(); + } else { + $path = null; + } + $this->liquid = new LiquidTemplate($path); } /**