M
M
maiskiykot2018-11-25 00:46:05
Habr
maiskiykot, 2018-11-25 00:46:05

How to themize teasers in drupal 8?

I needed to themize the teasers displayed on the main page and got into a stupor. They are not available through views or blocks, and the template for this teaser was not found. Prompt: in what direction to dig? I used to only theme 7ku.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
Andrey Burov, 2015-12-01
@BuriK666

I googled his nickname, first and last name .. and this is what was found https://vk.com/lifeboss

K
kmx, 2015-12-01
@kmx

Mendel I urge you
PS: on all TM resources, the login is the same, when mentioned here, he should receive a notification, and there already discuss the communication channel.

M
Maxim Dyachenko, 2015-12-02
@Mendel

Who seeks will always find)

I
Ivanq, 2015-12-01
@Ivanq

Mendel is expected. Everyone who wants to send something like this is requested, he will receive notifications.

A
afi13, 2018-11-25
@afi13

To get started, I advise you to enable debug https://www.drupal.org/docs/8/theming/twig/debuggi...
After enabling Drupal will display the names of templates that you can use directly in HTML comments. And you can create a teaser template for your nodes using the given name.
By default, templates like node--[node type]--teaser.html.twig and node--teaser.html.twig are already available to you
More details about default templates: https://www.drupal.org/docs/8 /theming/twig/twig-te...
But if you are missing some templates, then you can always add your own suggestions using hook_theme_suggestions_alter()
https://api.drupal.org/api/drupal/core%21lib% 21Dru...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question