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.
block.tpl assigns the 'accordion' id to every block, which is not valid markup. The accordion javascript also assumes that there is just one block present.
Comments
Comment #1
matt2000 CreditAttribution: matt2000 commentedTo clarify, the initialization of the accordion javascript assumes only one block. The AccordionList function itself works just fine with as many accordions as you like. So it's just a matter of assigning unique ids to the blocks, and fixing the init code in template.php to loop through all of the blocks and build a complete list of IDs to pass as an array.
Comment #2
atrasatti CreditAttribution: atrasatti commentedHi Matt,
thank you for reporting this, I will look into it and hope to have a fix by next week.
Comment #3
mitomac CreditAttribution: mitomac commentedAlso following this issue. Matt2000, do you have a patch to fix the problem in template.php?
Comment #4
atrasatti CreditAttribution: atrasatti commentedThis should now be fixed in CVS. You can see the changes here: http://drupal.org/cvs?commit=367950
If you are happy enough I will include it in the next release, maybe on Thursday.
Comment #5
matt2000 CreditAttribution: matt2000 commentedThis works. In my own solution, I did something similar, but I used the array syntax for AccordianList. So:
Not sure if that's a meaningful optimization, and it sure makes for ugly quoting, though nicer JS in the end, IMO. Anyway your solution is certainly good enough, so it gets my RTBC.
Comment #6
atrasatti CreditAttribution: atrasatti commentedExcellent and your implementation also looks easier, I'll release later this week an update.
Comment #7
atrasatti CreditAttribution: atrasatti commentedFixed in 1.3