seo-heading

Category SEO Heading Extension for Magento

I while ago I developed a quick-fire Magento extension to solve a very simple problem. When you name your categories, those category names are used in the navigation menu of your site.

The functionality for this is now built into our Magento SEO Extension which is available for FREE on Magento Connect.

GitHub Download: Magento Category SEO Heading

For example, let’s say you sell oak furniture for homeowners. If you have a category called ‘Bedroom Furniture’ and you want to optimise the category as a landing page for the keyword combo of ‘Quality Oak Bedroom Furniture’, you would need to modify the category name to make this the H1 of the page – one of the main keyword influences on the page.

The caveat is that doing this will also change the navigation text to ‘Quality Oak Bedroom Furniture’ which could look untidy and negatively impact the usability (and readability) of your site.

What does the extension do?

Using this extension, will create an extra category attribute called ‘Category H1’ which, if used, will replace the standard category heading (category name) with your new custom heading.

SEO Heading

How does it work?

For those of you interested, the majority of the work is done in a single observer, which looks for an instance of a category in the registry, and if found it sets the name to the SEO heading name. This means that it will update all instances of getName() on the category model – but you knew that already…

<?php

class Creare_Seoheading_Model_Category extends Mage_Catalog_Model_Category
{
	public function getName()
    {
		if (Mage::registry('current_category'))
		{
			if ($this->_getData('creare_category_heading'))
			{
				return $this->getCreareCategoryHeading();
			} else
			{
			return parent::getName();
			}
		} else
		{
			return parent::getName();
		}
	}	
}

Feel free to download and fork the extension on GitHub here: Magento Category SEO Heading, and let me know your feedback below.