Blesta Addons Posted October 25, 2019 Report Posted October 25, 2019 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 . Amit Kumar Mishra 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.