Skip to content
Snippets Groups Projects
Commit 5c4cc4ce authored by dyszczo's avatar dyszczo
Browse files

plugin supports paths

parent 13748280
No related branches found
No related tags found
2 merge requests!2Devel,!1renderer/resolver
......@@ -10,8 +10,11 @@ use WPDesk\View\Resolver\Resolver;
class LoadTemplatePlugin implements Renderer {
private $plugin;
public function __construct($plugin) {
private $path;
public function __construct($plugin, $path = '') {
$this->plugin = $plugin;
$this->path = $path;
}
public function set_resolver( Resolver $resolver ) {
......@@ -19,6 +22,6 @@ class LoadTemplatePlugin implements Renderer {
}
public function render( $template, $params ) {
return $this->plugin->load_template($template, '', $params);
return $this->plugin->load_template($template, $this->path, $params);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment