I have been trying to do the following method to create urls like:

`domain.com/portfolio/This_is_a_test_post`

```
function view ( $title )
{       
    $post = $this->Portfolio->find('first', array('conditions' => array(Inflector::slug('Portfolio.title') => $title)));

    //$posts = $this->Portfolio->title = Inflector::slug($title);

    if (empty($title))
    {
        $this->cakeError('error404');
    }
    else
    {
        $this->set(compact('post'));
    }
}

```

However it doesn't show the post! Obviously I'm doing something wrong... Any ideas on how I could fix this? Thanks