public function __construct(PHPSTLTemplateProvider $provider, $resource, $identifier) { parent::__construct($provider, $resource, $identifier); $this->path = new StupidPath(Site::Site()->url); if (substr($identifier, 0, 7) == 'file://') { $path = dirname(substr($identifier, 7)); $pl = strlen($path); foreach (array(Loader::$FrameworkPath . '/', Loader::$Base . '/') as $p) { $l = strlen($p); if ($pl > $l && substr($path, 0, $l) == $p) { $this->path = $this->path->down(substr($path, $l)); break; } } } }
public function __construct(PHPSTLTemplateProvider $provider, $resource, $identifier) { parent::__construct($provider, $resource, $identifier); // Stash away the current path for when we render $this->currentPath = CurrentPath::get(); }