I need content that has

Title
Teaser
Content

Note - when I refer to teaser here - this is not content that appears in the content. So - this is not a teaser in the way we think of the teaser of e.g a page node when displayed on the /node page.

I need to have a block that randomly picks one of these nodes and shows the title and the teaser content.

And a link to show the node where the title and main content is shown - but _not_ the teaser text.

I started with CCK. Added a title and two text fields - one for teaser and one for content.

Now - I've been reading http://drupal.org/node/82011

I can create a block view that has list type, specifies title and teaser, 1 node and random sort order. A good start.

But - the click on the title goes to the standard view node - which shows _both_ the teaser and the content.

I can see that I can create a page node via views that has only the title and content (will need to retheme this) - but - I can't see how to connect them.

I can see in the block view that you can add a link to the same view's page node - but then the two views have the same field list if I understood it correctly?

Am I going in the right direction? Any suggestions?

Comments

VM’s picture

forgive, i posted this in wrong topic: thats what i get for having two windows open reading from one typing in the other.

my apologies.

catch’s picture

I think your best bet would be contemplate - you can generate custom teasers for CCK node types easily, which display different content from what appears in the full node.

chrissearle’s picture

An interesting pointer - thanks.

In fact - just by pure chance I was listening to a lullabot podcast that spoke about contemplate last night.

It sort of works - I can remove the <h3> field header bit (yay) and only show one of the two $field_content items (the main body and not the teaser part).

But - it doesn't appear that the content in <?php print $field_content[0]['value'] ?> gets thru the right filters - I lose at least the new line converter input filter.

Do I have to code specially in the template to do the filter processing?

catch’s picture

Not 100% sure but the filter should be applied regardless of contemplate.

You'd need to make sure that you selected "user chooses input format" when you created the content type in CCK and not plain text though.

chrissearle’s picture

If I go into the node and edit - I can choose input type - and I've got Filtered HTML set. Very odd. View source shows the line breaks are in place. I'll query the module support queue :)

jjeff’s picture

The ['value'] isn't run through the output filters. You want to use:

print $field_content[0]['view']

--= Jeff Robbins | www.lullabot.com =--

chrissearle’s picture

Many thanks jjeff :)

Worked perfectly.

Still think it a good coincidence that I got the first suggestion here to use contemplate the very day after I heard you lot talking about it on the lullabot cast :)