Getting the template information in Drupal 7 is very easy.

Enable theme debugging

Run the following command from the terminal.

drush variable-set theme_debug 1 or drush vset theme_debug 1

If Drush is not enabled or installed, then add the following line in your settings.pho

$conf['theme_debug'] = TRUE;

Then clear the drupal cache.

View the template information from browser

After enabling theme debugging reload the page from a broswer. Using developer tool , inspect the elements.

Before each HTML blocks , you willl be able to see the corresponding Drupal temaplate files information appended.

This will be a commented code so theme information can only viewed by inspecting the elements.

Disable the theme debugging.

To disable the theme debuging run the following command.

drush vset theme_debug 0

or update the settings.php as shown below

$conf['theme_debug'] = false;