I want to change my page titles for categories but cannot find where it's originally set.
Right now, they look usually like this: Laptops – Computers – Electronics – Magento
But I cannot find the piece of code that lines up all the categories and seperates them with " – "
I expected it to be in
Mage_Page_Block_Html_Head
Or in
Mage_Catalog_Block_Category_View
Or maybe
Mage_Catalog_Model_Category
but it was nowhere to be found.
In Category_View the title gets only set when there is a title set in the backend:
if ($title = $category->getMetaTitle()) {
$headBlock->setTitle($title);
}
but there's no else
after that.
In Mage_Page_Block_Html_Head
there is the method getDefaultTitle()
which I'd expect to be called when no title has been set.
I am aware that I don't necessarily need to find that piece of code to change my title but it would certainly help to understand magento better.
For clarification:
I am talking about meta-titles.
I know how to set them.
I want to know where they are set that they look like this:
Laptops – Computers – Electronics – Magento
Thanks
Best Answer
It's located in
Mage_Catalog_Block_Breadcrumbs
.This isn't the most obvious location but kind of makes sense as the breadcrumbs are displayed in a similar manner.