christophermaeuer Posted August 12, 2014 Report Posted August 12, 2014 Dear Ladies and Gentlemen, I am new to the Blesta Plugin system, but I made it so far that my plugin shows a link in the nav_primary_staff: http://puu.sh/aPcEW/48bc6ec839.png (see "Newsletter") When I click on this link the index() function of my admin_main.php is called: http://puu.sh/aPcIw/f60d60bd06.png (this will be rendered) But as you can see there is no navigation (to see the difference: http://puu.sh/aPcOJ/06417b7c2d.png) This code is in my admin_main.php (controller): class AdminMain extends NewsletterController { public function index() { $this->view->setView(null, "Newsletter.default"); return $this->partial("admin_main"); } } This code is in my admin_main.pdt (view): test I hope you can help me! Greets, Christopher Quote
Tyson Posted August 12, 2014 Report Posted August 12, 2014 This code is in my admin_main.php (controller): class AdminMain extends NewsletterController { public function index() { $this->view->setView(null, "Newsletter.default"); return $this->partial("admin_main"); } } Hi Christopher, If that's the entirety of the controller, then you are missing the preAction method, which should contain a call to the parent::preAction(). See the documentation for more info. christophermaeuer 1 Quote
christophermaeuer Posted August 12, 2014 Author Report Posted August 12, 2014 Hi Tyson, at first thank you very much for your reply. I added the missing functions as follows: class AdminMain extends NewsletterController { public function preAction() { parent::preAction(); } public function index() { $this->view->setView(null, "Newsletter.default"); return $this->partial("admin_main"); } } But this does not solve my problem... Greets, Christopher Quote
christophermaeuer Posted August 12, 2014 Author Report Posted August 12, 2014 (edited) Oh well, I fixed the problem. The parent controller of this AdminMain Controller also missed the parent::preAction(); Now everything works fine. Thank you very much for your help! Greets, Christopher Edited August 12, 2014 by christophermaeuer 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.