How to use a custom Twig template to render "Add new comment form"?


I want to use a custom Twig template to render the "Add new comment" form.

However, this form is built with a LazyBuilder which I think do not allow me to suggest a new template.

I don't manage to tell Drupal to use my custom twig file to render the form.

In a form_alter, I dump the $form['#theme'] to see which suggestions are available by default. Here's the result:

Question re: hook_views_post_render()

Working on a module in which I'm trying to utilize this hook. According to the API docs, the arguments to this hook are:

\Drupal\views\ViewExecutable $view: The view object about to be processed.

string $output: A flat string with the rendered output of the view.

\Drupal\views\Plugin\views\cache\CachePluginBase $cache: The cache settings.

However, the second argument ($output), does not in fact, come in as a "flat string". It comes in as an array. Also, shouldn't that be "&$output", instead of "$output"?

D8 How to get rid of homepage field on comment for anonymous user

I'm a beginner with D8 but wrote own modules in D7. It is therefore possible that I miss some understanding to get easily what I need. All hints to help me step ahead are appreciated.

When I add a comment field to a node entity I have the possibility to configure for anonymous users between the following options:

See CommentItem.php

Language switcher block in Drupal 8

I have a two language Drupal 8 site, en, sv and have enabled the language switcher block. The block show up on all single pages but it do not showing if I have a view list. The view appears in the selected language, but the Language Switcher Block do not show.

Hope someone can give me some help on this.


Using Drupal as a support portal for a FB community

Hi chaps,

I'm having feelings about building a project using Drupal and I thought I'd better ask the community before getting hands on, so I'd basically love to hear opinions. Quick background:

Volcano - twig - theming - d8

Can anyone please tell me how i can in D8 add list items (social icons) to footer programatically?


Subscribe with RSS Subscribe to RSS - Drupal 8.x