Hello,

I just started working on a site using 5.x, and the strategy I used to use is 4.6/7 for pulling up a list of nodes and teasers by type doesn't seem to work any more. I can't find using the search a new snippet for this that works with 5.x. Any ideas on how to do this? I just want to be able to set a particular variable to the node type and have it display a set number of the most recent nodes of that given type, with titles and teasers.

Thanks for any help!

Comments

preferred name’s picture

This is the best that I have found.
http://drupal.org/project/last_node

forrestn’s picture

Thanks for the reply, but I'd like to actually have the code to do it so that I can customize it according to different needs. I'm going to be using this functionality in a lot of different places, and I'd like to be able to change how it looks, whether or not the titles are links, etc., so I really want to try to understand what needs to be done code-wise in a page to make this happen.

Thanks again for that fast response, though!

preferred name’s picture

It would be nice if someone could provide an example of a 10 most resent nodes in a block with a diff, name, and time, ect.

pyutaros’s picture

I don't get it. The code is available in the module. Is that not code you'd want to look at and try and customize?

Drupal's so easy, even I could do it.

preferred name’s picture

I have tried to customize the last_node module, but without any luck putting in a diff, time, name in the 10 most resent nodes block. Could you give us an example, perhaps with that module or a views module.

forrestn’s picture

I'm sorry, I'm not terribly experienced in PHP and I just can't seem to extract the appropriate code from that module. I can only find the ways to make links to the posts, but I can't figure out how to access the teasers for them. Again, sorry, I'm definitely not the most knowledgeable person when it comes to reading relatively complicated code.

Thanks for the replies.

pyutaros’s picture

No worries. I'm not much good at reading code either. I would possibly recommend the Views module?

Drupal's so easy, even I could do it.
http://www.kfol.org/

preferred name’s picture

how to make a 10 list with the views module?

TheCrow’s picture

is a good idea for major next version of last node module :))

I begin to work it!!!

TheCrow’s picture

it's out :))

preferred name’s picture

excellent news