I have created a file named: node-.tpl.php
and have successfully been able to theme the full view of nodes from this cck type.
Now I am trying to create a block with teasers of these nodes.
I have inserted the following code (taken from http://drupal.org/node/53464) into my node-.tpl.php file:
if ($teaser):
teaser template HTML here
else:
regular node view template HTML here
endif;
Now, I select "Node: Teaser" as the field to display in the block (using views).
However, no matter what i put into the 'teaser template HTML here' section in the file, the only thing that shows of the nodes in the block is their body field.
Is there something that I'm doing wrong here? Is this not the way to create a block with the teaser view of the nodes displaying?
thanks
Comments
woops - figured it
woops - figured it out.
Needed to create a view with Row style: Node> teaser.
Rather than a row style with fields.
Cheers!
Thx sylvie_n
I’ve been pulling my hair out about it.
Thanks!
Three years and about 10hrs after this comment still helps! :) So simple...