Finding overridden templates in Magento

Magento is pretty damned cool! I’m still getting used to it and so here’s another hint for you!

Anyway, the way the templating system is structured means that you can create a new folder and override the defaults by recreating the class/view/whatever in that folder.

For instance, our default customer login template resides in


This template can be overridden with another module, and it will automatically use the THEMENAME in question, so you can have multiple versions of the same view.

This is where it gets confusing!

For instance, I was happily editing said login page, only to discover that nothing had changed! I was on the wrong template! Anyway, it turns out that if you log into the admin panel, you can click on the System > Configuration menu.

Once there, at the top left, there is a dropdown select menu called ‘current configuration scope. Select the theme you are working on, and the page will reload. (This is based on the Manage stores section of the admin panel, which I havent worked on yet, but the essence of it is that you have a base system, which can have multiple stores, which can have multiple views.)

Once the page reloads, scroll down to the bottom of the left-hand column, and look for ‘Developer’ in the advanced menu. In the ‘Debug’ panel, you can turn Template Path Hints on or off. Hit save, and you’re almost set to go. Lastly we need to clear the cache, so click on the System menu, and select Cache Management. I leave cache OFF in my dev environment, however you can click select all, and click refresh option in the dropdown next to submit (should alreday be selected), then submit.

OK, so what did all that do then? Well, if you refresh the page you are working on, you’ll notice it suddenly looks messy! However, you can see exactly where each part of the page came from! 😀 When you are working on a project of the kind of size I’m working on right now (i.e. huge) then there’s a lot of time to be saved!

Template Path Hints turned ON
Template Path Hints

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s