I have created view for displaying the nodes. I want to know which function/file is executed when I click on the node listed in the view table. I want to add some code to the file when the node information is loading. Can anyone suggest me the function/file where i'm supposed to do the changes?

  • Your question is too vague to answer. Drupal goes through a whole bootstrap process with a lot of code executing in order to process the request. You can hook into nodes loading via hook_node_load. please never ever alter any existing code that is not your own. You need to always hook into code in your own module or overridden theme. Explain what you are trying to achieve in greater detail and perhaps someone can assist you. Commented Jun 12, 2015 at 4:51
  • Please don't ask duplicate questions.
    – Clive
    Commented Jun 12, 2015 at 8:17

1 Answer 1


You've two ways to afford the problem: Site building way If you're using a wiew of rendered nodes (usualy teasers) you can redefine the layout, tags, fields, etc. on admin/structure/types/manage/YOURCONTENTYPE/display/teaser

If you need more options try display suite and fences modules: https://www.drupal.org/project/ds https://www.drupal.org/project/fences

Developer way Editing your view, on the "advanced" colum, "other section" you've the "templates" there the "Theme: Information" item. There you've the name of the templates the view is using. You can redefine then on your custom them.

EXTRA BALL: Common sense way Probably a mix of two others are que best option

Not the answer you're looking for? Browse other questions tagged or ask your own question.