- Issue created by @coaston
- 🇸🇰Slovakia coaston
I just tested with Views Vanilla JavaScript Tabs only for 2 views. Separetelly both views works fine, but if you try embed one view into another the second view will change"Views Vanilla JavaScript Tabs" into "href" only.
and if I render one view to antoher - tabs will be changed to href:
- 🇺🇸United States flashwebcenter Austin TX
Nesting a view block inside another view block
- Install module: Download and enable Views Field View — https://www.drupal.org/project/views_field_view → .
- Content & display: Use the Article content type and the Teaser view mode. In Manage display (Teaser), add a Field Group configured as Vertical tabs or Horizontal tabs, and place your fields inside those tabs.
Create the Views
A. Inner view
- Create a Block display that renders Article in Teaser mode (so the Field Group tabs are present).
B. Outer view (VVJT tabs)
- Create a view that uses the VVJT Tabs format.
- Use Title as the tab label.
- Add a second field using View: View (from Views Field View) and select the Inner view’s Block display.
- This embeds the Inner view under each VVJT tab.
Place & Test
- Place the Outer view block on a page and test.
- You should see VVJT tabs on the outside, and the Field Group tabs inside each tab’s content.
Notes / Demo
- In my demo, I’ve nested a view block inside another view block. The inner block shows the Article teaser with a Field Group set to Vertical tabs. Both VVJT tabs (outer) and Field Group tabs (inner) work correctly. Here is the demo bottom of this page https://unitedstarsofamerica.com/node/87
If your setup differs
- Please reproduce on a fresh Drupal install using the default Article content type.
- Export the created views and share the exports. That way I can import them into a clean site and run the exact test you’re using.
Best wishes,
Alaa - 🇸🇰Slovakia coaston
Thank you so much for your detailed step by step.
I am not using a view field view module, just simple twig:
{% set nidid = nid|render|striptags|spaceless %}
{{ drupal_view('view_name', 'embed_1',nidid) }}However when I change "embed_1" to "block_1'" it works as expected.
So once again Thank you. Now that this issue is closed, please review the contribution record.
As a contributor, attribute any organization helped you, or if you volunteered your own time.
Maintainers, please credit people who helped resolve this issue.