title: CakePHP - How do i set the page title to an item name?
body: <p>OK, so I'm trying to teach myself the CakePHP framework, and I'm trying to knock up a simple demo app for myself.</p>
  
  <p>I have the controllers, views and models all set up and working, but I want to do something slightly more than the basic online help shows.</p>
  
  <p>I have a guitars_controller.php file as follows...</p>
  
  <pre><code>&lt;?php
  class GuitarsController extends AppController {
      var $name = 'Guitars';
      function index() {
          $this-&gt;set('Guitars', $this-&gt;Guitar-&gt;findAll());
          $this-&gt;pageTitle = "All Guitars";
      }
      function view($id = null) {
          $this-&gt;Guitar-&gt;id = $id;
          $this-&gt;set('guitar', $this-&gt;Guitar-&gt;read());
          // Want to set the title here.
      }
  }
  ?&gt;
  </code></pre>
  
  <p>The 'Guitar' object contains an attribute called 'Name', and I'd like to be able to set that as the pageTitle for the individual page views.  </p>
  
  <p>Can anyone point out how I'd do that, please?  </p>
  
  <p><strong>NB</strong>: I know that there is general disagreement about where in the application to set this kind of data, but to me, it is data related.</p>