Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/25/2019 in all areas

  1. when a client is logged in, blesta set the client info to the global structure view, but for staff is not the same, we can't get the staff name, email ... ect in the structure, this info is only available in the edit setting for profile. sample case, we need to show a welcome message (Hello mr xxxxxx, ....) in our theme . i think the code should be like this, and it should be done in the app_controller.php asi think, adding it to the admin_controller.php is not take any effect that because all admin_xxx file inherit from AppController directly $this->uses(['Staff']); $staff = $this->Staff->get($this->Session->read('blesta_staff_id')); if ($staff) { $this->structure->set('staff', $staff); } or the magic option is to allow as inject vars to the structure view from preAction event or any new similar hook, let say i want to inject a list of PM's to the structure to use it in our custom admin theme .
    1 point
×
×
  • Create New...