I'm looking at using views style plugin to render the CCK field - in other words if I define my default view to show as grid, I'd like that to be reflected on a nodereference field using views.

I've looked at the code, and I wonder what is the best approach for it. What I found so far, is:
optionwidgets_options() calls _nodereference_potential_references_views() that in turn returns from content_plugin_style_php_array_ac::render() the 'title' and 'rendered' of each option.

With the risk of talking complete nonsense, my thoughts are that maybe we should do something like this:
1) Preserve the original display before $view->display_handler->set_option('style_plugin', 'content_php_array_autocomplete');
2) content_plugin_style_php_array_ac::render() will also populate the theme information from the original display.
3) Back in optionwidgets_buttons_process() will put the #theme information.

Comments

amitaibu’s picture

I should add that I mean CCK input form (i.e. node add/ edit, not node view), forgot to mention it....

amitaibu’s picture

Component: optionwidgets.module » Views Integration
Status: Active » Needs work
StatusFileSize
new4.52 KB

Here's a first try. Not working but it's a start :)

RodrigoBalest’s picture

I'm looking for the same answer.
Subscribing.

amitaibu’s picture

Status: Needs work » Closed (won't fix)

The solution is to create a custom widget.