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
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

Wim Leers - March 13, 2008 - 10:49
Title:Hierarchical Select as a CCK widget» DROP Task: Expose Hierarchical Select as a CCK widget
Assigned to:Wim Leers» Anonymous
Status:postponed» active

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

Wim Leers - March 13, 2008 - 10:50
Title:DROP Task: Expose Hierarchical Select as a CCK widget» DROP Task: Offer HS as a CCK widget for the content_taxonomy implementation

#3

Wim Leers - May 12, 2008 - 19:32
Title:DROP Task: Offer HS as a CCK widget for the content_taxonomy implementation» Offer HS as a CCK widget for the content_taxonomy implementation
Version:5.x-2.0-rc4» 5.x-3.x-dev
Assigned to:Anonymous» Wim Leers

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

Wim Leers - May 12, 2008 - 22:47

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

Wim Leers - May 13, 2008 - 21:56
Title:Offer HS as a CCK widget for the content_taxonomy implementation» HS as a CCK widget for content_taxonomy

Lots of tricky things, but I got it to work. Getting ready for a beta! :)

See http://drupal.org/cvs?commit=116164.

#6

Wim Leers - May 13, 2008 - 21:56
Status:active» fixed

Oops!

#7

Anonymous (not verified) - May 27, 2008 - 22:02
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.