Im trying to display nodes of a certain type on a temaplte.

Kind of like a news section on a certaitin subject

I have created a teaplte ( page-node-2.tpl.php
and inserted ths code

print $content

       print node_page_default();
    

This currently displays the two( set within post settings in admin) recent stories

I have two story types
story and story_europe

On this template I would like to only display the two more resent storys of type story_europe

Can

       print node_page_default();
    

be modified to do this or would a nother method be used?

Comments

dtengeri’s picture

Why don't you use views module instead? It can filter out nodes by their type and show them in teaser mode. It has a graphical user interface, so you don't have to write a module for this. You can create tpl files for views too if you want a custom layout.
Project site:
http://drupal.org/project/views
There are a lot of tutorials on youtube:
http://www.youtube.com/results?search_query=drupal+6+views&aq=f

David

richyrich38’s picture

Thank you David,

Ill have a read and see what I can come up with

brandondely’s picture

You could use taxonomy terms to distinguish the story types (instead of creating different content type) then use a taxonomy filter in the view that you create.