Posted by torotil on November 23, 2011 at 12:20pm
For a client I'm working on module that allows to display a taxonomy based selection of nodes (as a view) in another node's content. This is accomplished in three steps:
- a field that can be attached to a node. For now it allows to store a taxonomy selection like: (tid1 AND tid2 AND …) OR (tid3 AND …) OR …
- a views argument handler for nodes that filters nodes by a tid expression like: (IN(t1,t2,…) AND IN(t3,t4,…) AND …) OR (IN(t5,…) AND …) OR …
- a field formatter that uses the selection of 1. to feed it into a views argument from 2.
You can find the module in my sandbox, here: http://drupal.org/sandbox/torotil/1325716
One weak point of the current module is the field_widget which isn't quite as usable as I'd like it to be. Note that this the html-output is only the base for a fancier JS powered widget. It has to work without JS though.
At this point I'd really like to get some input from other developers. Especially:
- Do you know better ways to approach this problem?
- How to create a better / more flexible field_widget?
- What do you think about that module?