views:

142

answers:

1

Hey there!

I have a few Views on my Drupal 6 site which take care of some of a node's fields.

For example, I have a content type called Country, which has a field called Capital. I've excluded this field in the node display, but there is a view that takes the node ID as an argument and displays it in the right column. This is all very pretty and has been working out well for me, but how do I take care of the node preview mode? Since the node isn't saved yet, the Capital field won't have its new value yet.

Note: I am ready to do some very dirty hacks to make this work :)

+1  A: 

don't hack drupal! :)
One of not so simple and unchecked idea:
use hook_form_alter or hook_nodeapi with validate in custom module, there's you should see data of new capital field, save it somewhere (for example, into sessions), and show it's into block via theming Views field.

Nikit
also, you might try using CCK Blocks (http://drupal.org/project/cck_blocks) instead of views, and save yourself from such a hassle.
barraponto