hi,
Great module!
Just wondering if I can create nested accordions in any way?

Thanks.

Comments

Manuel Garcia’s picture

Theoretically 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..).

chefnelone’s picture

Thanks manuel, I'll give it a try.

el_bob’s picture

Sorry 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.

bancarddata’s picture

I 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!

tmsss’s picture

hi 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

mafiosoking’s picture

^ did you solve this?
my nested accordion closes the toplevel accordion as well

edwbaker’s picture

This would be really useful functionality.

nicklewis’s picture

Ditto - 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.

project10’s picture

el_bob did adjusting the views template work for you, and if so can you post what you did?

jenscbc’s picture

Hi, 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.

Manuel Garcia’s picture

jenscbc 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.

Manuel Garcia’s picture

Title: Does it support to create nested accordions? » Support nested accordions
Version: 7.x-1.x-dev » 8.x-1.x-dev
Category: Support request » Feature request
Status: Active » Closed (won't fix)

There 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.

Manuel Garcia’s picture

If you want to do this you could probablyl accomplish it by making use of https://www.drupal.org/project/views_field_view