Title Property on Menu

I noticed the menu does not offer a "title" Property inside the <a> tag and It could be good to have it for SEO purposes, could you tell me how to achieve that ?

3 answers

Profile photo of chavan 100.00 $tone June 7, 2012
Public

Not sure what the issues is is, Please be elaborate, so i can help you more on this.

Note: If you Find my Post useful please click on the Thanks Icon

#1
Profile photo of Antoine Ubavicius 0.00 $tone June 7, 2012
Public

Not sure what the issues is is, Please be elaborate, so i can help you more on this.

Note: If you Find my Post useful please click on the Thanks Icon

On the top dropdown menu, here is an example of your <a> tag:

Code:

<a href="http://www.mycompany.com/Test-Category" class="">
<span>Test-Category</span>
</a>

while it should be

Code:

<a href="http://www.mycompany.com/Test-Category" class="" title="Test Category">
<span>Test-Category</span>
</a>

The title=Test Category" is missing and I dont know where to insert this "title" property, any idea?

#2
Profile photo of chavan 100.00 $tone June 7, 2012
Public

Go to this file: app\code\core\Mage\Catalog\Block\Navigation.php

Replace this code

Code:

 $html[] = '<a href="'.$this->getCategoryUrl($category).'"'.$linkClass.'>';
        $html[] = '<span>' . $this->escapeHtml($category->getName()) . '</span>';
        $html[] = '</a>';

With

Code:

 $html[] = '<a href="'.$this->getCategoryUrl($category).'"'.$linkClass.' title="' . $this->escapeHtml($category->getName()) . '">';
        $html[] = '<span>' . $this->escapeHtml($category->getName()) . '</span>';
        $html[] = '</a>';

Note: If you Find my Post useful please click on the Thanks Icon

#3

Please login or Register to Submit Answer

Written By

Comments