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.
hi,
Great module!
Just wondering if I can create nested accordions in any way?
Thanks.
Comments
Comment #1
Manuel Garcia CreditAttribution: Manuel Garcia commentedTheoretically if you embed a view within a view both using views_accordion.... not sure it'd be a good idea performance wise though (queries within queries..).
Comment #2
chefnelone CreditAttribution: chefnelone commentedThanks manuel, I'll give it a try.
Comment #3
el_bob CreditAttribution: el_bob commentedSorry to reopen this, but if I have a table which has more than one category, as well as subcategories within it, is there a way to nest that way? I'm not looking to nest multiple views.
So for an example:
regions (North America, South America, Europe, Asia, Australia)
inside each region is country/state (europe has France, Spain, Germany, etc, NA has New York, California, etc)
inside each country/state is cities (France has Paris, Marseilles, Nancy, etc, New York has New York, Albany, etc)
inside each city are addresses.
if you can collapse it so that opening a region gets you a collapsed set of country/states, and opening each one of those gets you a collapsed set of cities, and opening each one of those cities gets you the addresses in that city.
I hope this explanation makes sense. Wouldn't make much sense for me to create what is basically a view for each city, and those go inside a view for country/state, and those go inside regions.
EDIT: never mind, I think it's just easier for me to adjust the views template for that specific block.
Comment #4
bancarddata CreditAttribution: bancarddata commentedI am interested in a similar result as posted above. Here is a simplified version of my request that perhaps someone might help me figure out:
I have a list of taxonomy terms with related node's titles and teasers listed below each one (grouped by taxonomy term). In the Views Accordian settings, there is a setting "Use the group header as the Accordion header ". When this is NOT checked, my terms are not collapsed but rather the teasers are beneath the titles of the nodes. When it IS checked, the terms are collapsed but the teasers are not. Is the "view inside a view" still the best way to accomplish both of these behaviors simultaneously - i.e. the terms collapsed as well as the teasers beneath them?
Thanks!
Comment #5
tmsss CreditAttribution: tmsss commentedhi there!
I'm trying to do the same, I've embedded an views accordion view inside another views accordion with views field views module but when I close the embedded view the hole accordion closes. Does anyone have a solution for this?
Cheers
Comment #6
mafiosoking CreditAttribution: mafiosoking commented^ did you solve this?
my nested accordion closes the toplevel accordion as well
Comment #7
edwbaker CreditAttribution: edwbaker commentedThis would be really useful functionality.
Comment #8
nicklewis CreditAttribution: nicklewis commentedDitto - I'd like to know too but in the meantime, going to hunt the web for other options. If I find any, I will share them here.
Comment #9
project10 CreditAttribution: project10 commentedel_bob did adjusting the views template work for you, and if so can you post what you did?
Comment #10
jenscbc CreditAttribution: jenscbc commentedHi, take a look at: https://drupal.org/node/2178101 there is a patch that could be a solution if I understand your needs correct.
I'll test that later and review. Please help review if you still have the need for a solution.
Comment #11
Manuel Garcia CreditAttribution: Manuel Garcia commentedjenscbc is right about that patch, I've just updated and committed the patch which should help with this you guys are trying to do here.
#2178101: Multiple / embedded view accordions don't work
Please test it out using the latest dev tarball. It should in theory work, let us know how it goes.
Comment #12
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation commentedThere are no plans for now to support such feature, however if you really want this and can provide a patch I'll have a look.
Comment #13
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation commentedIf you want to do this you could probablyl accomplish it by making use of https://www.drupal.org/project/views_field_view