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.
It would be nice to have the results that views spits out in a list be collapsible.
Views blocks do not spit out an ID attribute by default on their blocks, and the content within the block has a class of "view-content", not "content", which is what collapsiblock.js searches for.
I was able to have views spit out an ID attribute by overriding the template, but it still cannot collapse the view results.
Comments
Comment #1
xayberoptix CreditAttribution: xayberoptix commentedi second that!
Comment #2
surgeonbor CreditAttribution: surgeonbor commentedI third it!
Comment #3
arx-e CreditAttribution: arx-e commentedThat would be sooo nice!!!
I've been trying to figure whether something like that is possible through CSS or something...
I want a big list of projects chronologically sorted with title and country showing initially (something very easily done) but I want to let the viewer expand one of the items in the list. How can this be done???
Comment #4
arx-e CreditAttribution: arx-e commentedNo sooner had the ink of my post here dried than I found the solution!
Just check this awesome module: Views Accordion (http://drupal.org/project/views_accordion)
And if you want to use multiple fields in the collapsed form pay attention to the "Using several fields a the accordion header" section here: http://drupal.org/node/366263
Comment #5
gagarine CreditAttribution: gagarine commentedComment #6
gagarine CreditAttribution: gagarine commentedWitch version you use of views. I try and every things work for me.
Comment #7
gagarine CreditAttribution: gagarine commentedComment #8
gurtner CreditAttribution: gurtner commentedIf you're using Drupal 7 and you've stumbled upon this post via googling for a solution like me, check out the solution I posted at https://www.drupal.org/node/101465#comment-9141349
hope it's what you're looking for ;-)