I’ve looked around for how to do this, but nothing is working.
I have a .phtml file and want to use this to overwrite the current title (which sits between the <title></title> tags).
I found somewhere that $this->getLayout()->getBlock('head')->setTitle("New Title"); was suppose to do it, but that doesn’t. However $this->getLayout()->getBlock('head')->getTitle(); correctly return the current title correctly.
Any help will be great
I don’t think you can do it in the .phtml. I would use the local.xml file and follow this guide.
This allows you to set the title for different pages like so: