tags:

views:

51

answers:

2

I have a content types that has a field which holds a list of references to other nodes. By default I can display this as a list which holds titles or have the teasers.

Is it possible to present these as a table instead? Is there a module for that or a trick in Views I could use?

A: 

Because what you need to theme is the display of the field itself, I think your best option is to create a custom module that implements a new formatter for nodereference. Then for your field, you can just select that formatter under display options (or whatever it is called).

I've never created a formatter before, but a bit of Googling revealed this article: http://manueg.okkernoot.net/blog/200907/how-create-cck-formatter

You could also very easily look at the nodereference module itself and see how it implements its current formatters (full node, teaser, etc.).

Hope that helps!

CalebD
+1  A: 

There is indeed a module, custom formatters. It's pretty easy to use too.

http://drupal.org/project/custom_formatters

Jourkey

related questions