I want to override page title of catalog pages to include selected attributes and subcategories.
e.g. "Shoes – Adidas – Red | Brand"
What observer or model should I override to modify the page title? And how can I get current category?
Thank you very much!
Best Answer
You can easily change the title of the page.
Get the block
head
and set the title e.g.The current category can be found here:
And the event to use? Good question. I would probably hook into
core_block_abstract_to_html_before
and check wether the block isMage_Page_Block_Html_Head
You have to add a few more checks, e.g. you are on a category page or product page. And you have to check whether
current_category
exists.