HS as a CCK widget for content_taxonomy
Wim Leers - March 3, 2008 - 09:06
| Project: | Hierarchical Select |
| Version: | 5.x-3.x-dev |
| Component: | Code - Content Taxonomy |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Wim Leers |
| Status: | closed |
Jump to:
Description
HS should also be available as a CCK widget, for at least the content_taxonomy and location fields.
Note: content_taxonomy is already supported via form_alter()ing currently.

#1
Making this a DROP Task. Let's see if we can sparkle some interest … :)
Basically, you only have to implement hook_widget_info() and hook_widget(), and then even only for the content_taxonomy module implementation. The widget itself is of course already written: it's just that it's not yet being exposed as a CCK widget.
You can look at the implementation in the money module for a clear example of what this will look like: http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/money/money....
#2
#3
I've begun working on this now. CCK's hook_widget_settings() has *no context* at all though, it doesn't even have a means to find out on which field you're working… this is a major problem, because for my common_config_form stuff to work, I need to find out *at least* $params (in this case: the vocabulary id).
#4
Making good progress now (finally).
The context problem has been solved (by extracting the context from the URL – ugly, but it works). But another problem has presented itself: CCK's own widget settings mechanism is very limited: it doesn't allow for multiple dimensions of settings. So I still have to let the user do the HS config on a separate form (and separate page).
#5
Lots of tricky things, but I got it to work. Getting ready for a beta! :)
See http://drupal.org/cvs?commit=116164.
#6
Oops!
#7
Automatically closed -- issue fixed for two weeks with no activity.