I'm working on a project that consists of transferring a laravel website to drupal. One of the features that I'm having difficulty recreating is separating content information into tabs. This content already exists in Drupal and is grouped into a content type.

I need to create tabs in Drupal for a type of content that uses paragraphs to separate descriptions, this is the base model made in Laravel.


In the content there is a paragraph called "bloco de informações" where each description and its title are separated. Here is the paragraph in the content:


In the Drupal views I created a block and I am using the bootstrap tab in formats to create the tabs that separate the information from the content and using an identifier in the contextual filters to get the information relating to that content when it is on your page. This part more or less worked, the paragraphs were separated into tabs but when clicking on the tabs it does not change information, the page url changes but the tab remains static and is carrying all the paragraph information relating to that content in a single tab.


I tried to use the "Tokens in Views Filter Criteria" module in the filter criteria to separate the paragraphs into the tabs so that the transition occurs where, when clicking on a tab, it only brings me the content information relating to that paragraph, but when doing this , with the options I tested, it didn't load anything, it was blank, nor did the tabs option appear.

What I need is to know if it is possible to separate the content by tabs with the options I have, if anyone knows a better way to do this. I've been stuck with this problem for a few days and I still can't see the light at the end of the tunnel.

  • 1
    You can use another way: preprocess your paragraphs to array of values and use this array in twig template. Then you can use "for" loop and create layout for tabs from your array
    – Vanish
    Oct 2, 2023 at 11:44

1 Answer 1


Have a look at the Field group module (https://www.drupal.org/project/field_group). With that module, you can create horizontal and vertical tabs in a certain entity's view and form display (node, for example).

I hope it helps!

  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Oct 4, 2023 at 10:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.