Hi all I have a 'profiles' table and I need to make this available in my default.ctp view file as I am trying to load profile images. I currently use the $current_user to access the 'users' in the form $current_user['filename']. My user and profile relationships have been set in my models accordingly. If anyone could help I would appreciate it. Thanks in advance.
My AppController's beforeFilter declaration attempt:
$this->set('profile', $this->loadModel('Profile'));
$this->set('profile', $this->User->find('all'));
My default.ctp view file code attempt:
<?php echo $this->Html->image('/uploads/profile/filename/thumb/small/'.$profile['filename']); ?>
Current code:
<?php echo $this->Html->image('/uploads/profile/filename/thumb/small/'.$current_user['filename']); ?>