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.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 460404-2-views-display-for-cck-input-format.patch | 4.52 KB | amitaibu |
Comments
Comment #1
amitaibuI should add that I mean CCK input form (i.e. node add/ edit, not node view), forgot to mention it....
Comment #2
amitaibuHere's a first try. Not working but it's a start :)
Comment #3
RodrigoBalest commentedI'm looking for the same answer.
Subscribing.
Comment #4
amitaibuThe solution is to create a custom widget.