A couple of remarks:
- Since CCK itself does not have a strict hierarchical format to represent an item *uniquely* in such a hierarchy, we generate one on-the-fly.
- I've put the implementation in a separate file, content_hierarchical_select.inc, because it doesn't really belong anywhere else
- This file is included in hook_menu()'s uncached path. You can't just include it when you need it, because I also need to include it on JSON callbacks. If you don't like this, I could make HS automatically look for a "<modulename>/<modulename>_hierarchical_select.inc" file and include it on
the fly.
- I'm still working with merlin to get the CSS/JS loaded up front (through a new, yet to be written hook in Panels 2), Drupal.settings will also be handled through Panels, in a similar manner as in Views 2.
- Because of the previous remark, not everything that's necessary for HS, is loaded. HS degrades gracefully (albeit less gracefully without the CSS), so it stays functional. However, the "Add pane" button stops working, for an unknown reason (haven't had the time to track down the cause).
- You *can* use it properly in the demo module I attached.

So, summarized:
- the implementation of the HS API works fine.
- for actually using this with Panels, you may want to wait (due to the modal).
- you *can* use HS as a "progressive enhancement" elsewhere in the CCK UI, as long as you're not doing it in a pop-up. (I haven't looked where this could be useful, just saying that you can.)

CommentFileSizeAuthor
hsdemo.zip1.75 KBwim leers
cck_hierarchical_select.patch8.41 KBwim leers

Comments

wim leers’s picture

Status: Needs work » Needs review

Actually, the patch itself doesn't need work. It's Panels that does. So changing to CNR.

Forgot to mention: you must test this with HEAD of Hierarchical Select. It will work with version 2.2 as well, but HEAD no longer depends on jquery_interface, only on jquery_update, so that's one less dependency.

Ulti’s picture

Hi Wim, thanks for your work on this! I need to make CCK fields manageable in Panels2 for the users of a new intranet site I'm making. With the current solution on the recent CCK issue thread, it’s a bit of a nightmare to browse through all the fields, I can't really let any users have a go with panels, until it is simplified in a hierarchy. So I think this is going to be an important addition. Can you let me know about any developments specific to Panels2? Many thanks for your efforts.

wim leers’s picture

I will post Panels 2 updates here as I receive them, yes :)

I talked about it last week with sdboyer and merlinofchaos and Panels 2 *will* make the necessary changes to support dynamic loading of CSS/JS/Drupal.settings to make HS work inside the Panels 2 JS modal. merlin knows how to do it, all he needs is time.

karens’s picture

Version: 6.x-1.x-dev » 5.x-1.x-dev

I assume this is for D5 not D6. There is no Panels 2 for D6 and there is no content_panels.inc in the D6 version of CCK.

wim leers’s picture

Oops, of course :)

karens’s picture

Status: Needs review » Postponed (maintainer needs more info)

This kind of died. Is it still valid?

wim leers’s picture

If CCK's API's didn't change, it should still work.

rjbalest’s picture

Is this still the best module to get hierarchical select in CCK fields or has something else superseded it?
I'm about to check it out. I'm hoping that I can seed the options with existing flat taxonomies. So I can build strings from taxonomy terms in differenent vocabs. Like: aterm2-bterm3-cterm5

So many modules ...

Defender-1’s picture

Version: 5.x-1.x-dev » 6.x-3.x-dev

CCK's API changed a little bit. Will there be any updated patch?

markus_petrux’s picture

Version: 6.x-3.x-dev » 6.x-2.x-dev
Status: Postponed (maintainer needs more info) » Closed (won't fix)

CCK3 is related to the multigroup. Please, see #494100: State of the multigroup module.

Also, I'm marking this as won't fix. AFAICT, it won't happen for CCK for Drupal 6. And I think it's been implemented in contrib.

http://drupal.org/project/hierarchical_select