customize pageTitle to post title

I would like to customize the title tag in the layout file. If the request action is Show, I would like set Title=$post->title, otherwise, use pageTitle.

anybody know how to get this variable?

In your action, do:



$this->pageTitle=$post->title;


Thank you very much, qiang. Didnot know it is so easy. :)