By pan69 on
Hi. I've been looking all over the place but I can't seem to find it.
Say that on a page I want to render a list of nodes. I have the node Id's and with node_load() I can load all the nodes. What I can't seem to figure out is out to render these nodes in teaser view and more specifically, render the nodes using the dedicated node template as if it was part of my $content variable.
Any help is very much appreciated!
Thanks,
Luke
Comments
search for node_view.
search for node_view.
Hi. I already tried that. It
Hi. I already tried that. It didn't work.
When I dumped the structure of the $node variable I noticed that 'teaser' was set to nothing, teaser =>.
Is there only a certain
Is there only a certain point where this code is allowed? E.g. if I put the above code on a page template (or even inside the template of another node) can that cause the node not being rendered? Does this type of code only work before certain render systems kick in?
What do you mean it does not
What do you mean it does not work. $node->teaser is set by node_view() and can be accessed in node.tpl.php
Hmmm. Seems to work now.
Hmmm. Seems to work now. Don't know what I'm doing different or what I did wrong. Thanks for you help anyways!