Skip to content

Commit

Permalink
pass filesystem root to liquid
Browse files Browse the repository at this point in the history
  • Loading branch information
tanigami committed Nov 7, 2018
1 parent a9b6488 commit 4b2eacc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Liquid.php
Expand Up @@ -3,6 +3,7 @@

namespace Shippinno\Template;

use League\Flysystem\Adapter\Local;
use League\Flysystem\Filesystem;
use Liquid\Exception\ParseException;
use Liquid\Exception\RenderException;
Expand All @@ -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);
}

/**
Expand Down

0 comments on commit 4b2eacc

Please sign in to comment.