title: How to make a Model available in a View Cakephp 2.x
body: <p>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.</p>
  
  <p>My AppController's beforeFilter declaration attempt:</p>
  
  <pre><code>$this-&gt;set('profile', $this-&gt;loadModel('Profile'));
  $this-&gt;set('profile', $this-&gt;User-&gt;find('all'));
  </code></pre>
  
  <p>My default.ctp view file code attempt:</p>
  
  <pre><code>&lt;?php echo $this-&gt;Html-&gt;image('/uploads/profile/filename/thumb/small/'.$profile['filename']); ?&gt;
  </code></pre>
  
  <p>Current code:</p>
  
  <pre><code>&lt;?php echo $this-&gt;Html-&gt;image('/uploads/profile/filename/thumb/small/'.$current_user['filename']); ?&gt;
  </code></pre>