<
Neerav Mehta
Founder & CEO
This is all we need to create a new theme.
bootstrap-theme.min.css │ └── bootstrap.min.css └── js └── bootstrap.min.js
Then we will create a new view from "admin/structure/views/add" to show latest added articles.
Here is a screenshot for our view initial settings:
After saving the view we will click on "Content: Title" and uncheck "Link to the Content", then add the "Body" field.
Here is a screenshot for the view final settings:
Views default templates are located under "/core/modules/views/templates/" folder.
Each view uses minimum of two templates:
Each type of the view templates above can be overridden with a variety of names. The template name is a concatenation of (base template name, view machine name, view display type and view display id - separated by 2 hyphens "--").
The following are the possible template names sorted by precedence:
For example; If we want to override "views-view.html.twig" template for our view, the following template names are valid:
To build our version of bootstrap accordion, we will need to override "views-view-unformatted.html.twig" (because this is the style in use) and "views-view-fields.html.twig".
The easiest way to get started is to copy the templates from /core/modules/views/templates folder into our theme folder and then rename "views-view-unformatted.html.twig" to "views-view-unformatted--articles-accordion--page-1.html.twig" and "views-view-fields.html.twig" to "views-view-fields--articles-accordion--page.html.twig"
{% for row in rows %}
{% set row_classes =
[ default_row_class ? 'views-row', 'panel', 'panel-default', ]
%}
{{ row.content }}
{% endfor %}
{{ fields.title.content }}
This is how how our accordion looks like.

Neerav Mehta
Neerav Mehta is the Founder & CEO of Red Crackle. With sterling qualities, Neerav’s technological acumen is firing a generation of progressive companies on the digital path. With an undergraduate degree in Electrical Engineering from India's most prestigious institution IIT Bombay and having spent seven years developing and contributing to the launch of AMD's innovative line of computer products, Neerav founded Red Crackle where he is lauded for his dynamic and innovative genius.
Let’s get you started!