Blesta Addons Posted September 10, 2015 Report Posted September 10, 2015 i need to call a .pdt file inside the base root view from my plugin controller . let say i want to call "app\views\admin\default\admin_login.pdt" from my plugin controller and pass it the vars . i know a simple solution is to clone the file inside my view's plugins , but the client need to use root pdt file . i have tried with setDefaultView function but it always include the view plugin directory . thanks Quote
Tyson Posted September 11, 2015 Report Posted September 11, 2015 How about: $vars = array(); $this->view->setDefaultView(APPDIR); echo $this->partial("admin_login", $vars, "admin" . DS . "default"); Blesta Addons 1 Quote
Blesta Addons Posted September 11, 2015 Author Report Posted September 11, 2015 Thanks tyson , you have opened another door for me but is not a workig solution for my actual need , it get the pdt file as i need , but the view still pointed to the app/views/admin .... how i can return it to the plugin view . this is possible to do it with $this->render("admin_login"); ? Quote
Tyson Posted September 11, 2015 Report Posted September 11, 2015 Try this $vars = array(); $view_path = $this->view->view_path; $this->view->setDefaultView(APPDIR); echo $this->partial("admin_login", $vars, "admin" . DS . "default"); $this->view->setDefaultView($view_path); Ken Ng, activa and Blesta Addons 3 Quote
Blesta Addons Posted September 11, 2015 Author Report Posted September 11, 2015 fabntastic . i get what i want by your help . Tyson 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.