I have a newspaper-like site. I would like to present some articles specially. I thought to use a node queue for this. The first article should be presented as the top story, so I created a block for it and told that block to print the first node of the queue only, as a teaser.

Subsequent articles of the node queue should be presented as "normal" teasers, so I created a second block for them and told that block to print all nodes of the queue except the first, as teasers.

Now I want the top story to look different than the other teasers, and I believe that not everything can be done from CSS. For instance, the top story should have a larger thumbnail than the other stories. This means that I need to reference different images for the two types of teasers.

I have already created a module that implements hook_nodeapi so that I can frob teaser creation from PHP. So I think all I need is to somehow pass information into my implementation of hook_nodeapi that specifies which block the node is in.

But maybe it was wrong to use a module and I should have done it from the theme? I'm too much of a newbie to know what goes where.

(I have a need to frob teaser creation because the teaser includes the beginning of the node text, even if that text includes images. I made it so that it strips img_attach tags from the text before computing the teaser. While editors should have control of how to present images in articles, I want the to keep control of how to present images in teasers.)

Thanks.

Comments

subir_ghosh’s picture

kaig:

pls have a look at this page: http://www.newswatch.in/newsblog/home/

you looking for something like this?

the top story is fetched from queue A
the other highlighted stories are from queue B

i have not used any hooks or anything for i have no clue about those

cheers

subir

joachim’s picture

Nodequeue just provides you with a way of selecting nodes.
For displaying them differently, yes, you'll want to use other modules or theming. For different sized images, use imagecache and pick different image sizes for different views.

ezra-g’s picture

Title: Different teasers for different queues » Document Views Offsets
Version: 5.x-2.0 » 7.x-2.x-dev
Component: Code » Documentation
Category: support » task

This sounds like an example of Views offsets.

If you're still on views 1 (Drupal 5), see http://drupal.org/node/141765

If you're on Views 2 (Drupal 6 and way more powerful) the offset is configurable in the view.

This is worth adding to the nodequeue documentation

fizk’s picture

Status: Active » Closed (works as designed)