Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm using ConTemplate for a node with three different collapsible field sets. I've got the template generating html that matches the previous non-ConTemplate version, but the collapsible field sets are not operating.
I thought that the ConTemplate version was simply missing some javascript "$(document).ready()" logic to attach a collapsing callback to the link that handles the collapsing, but another page that I have with CCK collapsing field sets does not appear to have any such javascript "$(document).ready()" logic...
Any idea what is necessary to get the collapsing field sets to operate?
Comments
Comment #1
bsenftner CreditAttribution: bsenftner commentedGot it working. (but one issue at the bottom of this post.) Solution for others, inside the Body Variables of a ConTemplate template there are group fields like "$node->content['group_location']['#children']" that can be used. If such groups are specified as collapsible when the CCK field is configured, that Body Variable will also be collapsible.
Additionally, if one wants a different layout (with collapse ability), the key seems to be setting up the field set like this:
not like this (which is how it may appear in firebug's inspect):
These operate the same (both the Body Variable form and the hand coded form) but suffer from fairly serious browser flashing. I'm on a fairly nice Mac Powerbook, and the flashing is the entire browser window during a collapse. The flashing is much less on an expand, but still visible. A non-ConTemplate collapsible CCK field group does not flash like this...
Any idea where to look or how to fix?
Comment #2
jrglasgow CreditAttribution: jrglasgow commentedthis is the way I do it when I want a collapsible fieldset:
this will print out the fieldset you want, for more information: http://api.drupal.org/api/function/theme_fieldset/6
Comment #3
bsenftner CreditAttribution: bsenftner commentedThank you James. I had not seen that before, very helpful!!!
-Blake