A view inside another View, updated with AJAX I have a View of taxonomy terms (categories of books). This View lists all of the categories available to the user. Now I would like that, when the user clicks on the Category, a div will appear with a few books (another View, with contextual filter). By clicking on a link, I can go to the full View or to the details of the book, but if I do not click on any link, and go to another section and click on the title, I would like the earlier section to close the div, and another div with new books will appear in this new section.

The schema would be something like this:


Category 1
Category 2
Category 3


When clicking on Category 1, with AJAX there will appear:


Category 1 ---> the next part appears retrieved with AJAX


Book 1
Book 2
Book 3
See more books on Category 1 &lt;--- END of content thrown by AJAX call.

Category 2
Category 3


I have been able to make it work without AJAX, using both modules Views Field View and Views Accordion.

However, I cannot find out how to make it work with AJAX, so no tab content is loaded it will be loaded in AJAX when clicking and opening one tab category, so the browser memory/speed/server requeriment is not impacted if I just want to see books in one category.
Views Megarow sounds like it would be ideal for this situation as it opens up a new "accordion" page in the middle of your view like you desire. 

You would need to build a new view page / panel page for the parent terms which list the books. This can be done in many ways but I guess a view for /categories/%tid would be the easiest.

The benefit is that you can really do a lot of stuff inside that page.. Blocks / Comments / Multiple Views etc. along with just listing books. If you already have pages for each category, it would be a case of creating a version suitable for loading inside the megarow.

It doesn't close the last category but I guess you could get past that with some basic jQuery.