Jump to content

Tadso

Members
  • Posts

    3
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Tadso

  1. Problem found: typo in folder name "controllers". Also, for a new page in the client the combination of: $this->structure->setDefaultView(APPDIR); and $this->view->view = 'default'; renders the new page inside the client portal. Consider this topic as solved.
  2. All I did was following the documentation: https://docs.blesta.com/display/dev/Creating+a+Plugin except managing and https://docs.blesta.com/display/dev/Plugin+Actions so my plugin does not contain any custom logic, just the bare minimum. it has one action for the navigation, one controller and one view. I tried to find what i was missing by reading the code from the other plugins, but couldn't figure it out. Where can I find more info about: $this->structure $this->view $this->partial If there is a documatation about the renderer used i might be able to figure out what i am missing. I tried to set $this->structure->setDefaultView(APPDIR); in preAction() of the UsageController. No matter what i change or copy from other plugins, I always get the same error. I think the "views/client/bootstrap/client_main_myinfo.pdt " is part of the main bootstrap template and gets loaded anyway, i just don't get why the other plugins like "order" have no issue with this.
  3. Hi everyone, I try to make a plugin to show some usage statistics for the client. I created a plugin "usage", added the action for the navigation, set up language files etc., everything that is required per the documentation. I created a controller file "plugins/usage/controller/client_main.php" and the view "/plugins/usage/views/default/client_main.pdt". Once i press the new navigation item "your usage" that leads to "client/plugin/usage/client_main/index/" i get a blank page and in the error log ther is the follwing error: [2020-06-16 12:27:39] general.ERROR: Exception: Files does not exist: /mypath/blesta/plugins/usage/views/client/bootstrap/client_main_myinfo.pdt in /mypath/blesta/vendors/minphp/bridge/src/Lib/View.php:158 Stack trace: #0 /mypath/blesta/vendors/minphp/bridge/src/Lib/Controller.php(222): View->fetch('mypath...', NULL) #1 /mypath/blesta/app/controllers/client_main.php(717): Controller->partial('client_main_myi...', Array) #2 mypath/blesta/app/controllers/client_main.php(50): ClientMain->setMyInfo() #3 mypath/blesta/vendors/minphp/bridge/src/Lib/Dispatcher.php(133): ClientMain->preAction() #4 /mypath/blesta/index.php(21): Dispatcher::dispatch('blesta/...') #5 {main} why is it looking for the "client_main_myinfo.pdt" in my plugin folder, it is in the app-folder?
×
×
  • Create New...