Community & Support

How can I have parts of the content of a node to appear inside a block

Hi,

What I'm trying to do is to create a content type with some extra cck fields, like size/color/weight of
a product and when published the main content and title should appear inside the node but the three custom
content elements should appear inside a block instead of the node.
What is the best way to achieve this? Views? or do I have to create my own module?

Thanks alot!

Comments

=-=

views can do it with a block display.

I'd investigate arguments so that you can work with one view for all content types. more information on arguments at gotdrupal.com

Views will work fine, make a

Views will work fine, make a block display, you should use Node: nid as an argument and you will need to set default argument handling. Under fields select the fields you want to display.

Thanks a lot for the replies

Thanks a lot for the replies guys, but I have a question,
do I have to create a new view for each new page or whenever a page
of a specific type is displayed the block will show the fields that I have specified..

cheers!

It depends, in general a

It depends, in general a views block will show on all pages. But if the view takes an argument that depends on the current page it might not produce any output and therefor not show. You can also configure the block and set the block visibility there. You can control visibility by role, path or using PHP code.

nobody click here