I want to check, in a node template file (node-node-type.tpl.php), that code is executing because of a direct request from a user visiting a node page or from calling node_load function in somewhere else?
EDIT:
the problem was 'Number of posts on main page'
option in 'Post settings'
. its value was 30 (I don't remember why I set it to its maximum value but I'm sure there was a reason that wasn't related to it's true functionality I think it triggers something else).
now that we know problem is from 'Number of posts on main page'
option how I
can I fix it?
why this option invokes node template file despite the fact that I use a custom page.tpl.php
which doesn't call node_view
at all?
node_load
is a core function no node can be loaded without this call.node_load()
doesn't ever invoke the node template file. It's a function for loading a node, it has zero connection to the theme layer. I think you're getting it confused withnode_view()
, which does invoke the node template file