[Tofu And Tomato] How to add CSS classes to Magento top links.

Ever wonder or ever hit your head on the wall what bloody template file controls the site link, footer link in Magento and how to add a class to it? That’s right, it’s thepage/template/links.phtml.

The template file generates ‘first’ and ‘last’ class in li tag, but sometimes we need more styling in each individual link list and we want to add a class either in li or anchor tag without hacking the core file or extend a class in Magento core, how do we do that?

The answer is in the xml file

magento-top-links

LET’S HAVE A LOOK AT MY CODE:Screen Shot 2014-10-18 at 11.38.48 AM