Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
removed tags from title
Source Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

Access to D8 core comment preprocess variables in D8a custom comment layout twig template?

I've asked about this on d.o layout_plugin, ds and forum but no joy as yet.

In D8Drupal 8 I have a custom comment type and when I use the default core comment.html.twig to render the comments then variables like 'new_indicator_timestamp' and 'parent' get rendered as expected. But if I switch to using a custom layout (via layout_plugin and display suite) and copy across the relevant twig template code for those core comment preprocess variables into my own custom layout then they don't work.

What do I need to do to ensure that the comment.module template_preprocess_comment()template_preprocess_comment() variables are available to my custom comment layout?

Access to D8 core comment preprocess variables in D8 custom comment layout twig template?

I've asked about this on d.o layout_plugin, ds and forum but no joy as yet.

In D8 I have a custom comment type and when I use the default core comment.html.twig to render the comments then variables like 'new_indicator_timestamp' and 'parent' get rendered as expected. But if I switch to using a custom layout (via layout_plugin and display suite) and copy across the relevant twig template code for those core comment preprocess variables into my own custom layout then they don't work.

What do I need to do to ensure that the comment.module template_preprocess_comment() variables are available to my custom comment layout?

Access to core comment preprocess variables in a custom comment layout twig template?

In Drupal 8 I have a custom comment type and when I use the default core comment.html.twig to render the comments then variables like 'new_indicator_timestamp' and 'parent' get rendered as expected. But if I switch to using a custom layout (via layout_plugin and display suite) and copy across the relevant twig template code for those core comment preprocess variables into my own custom layout then they don't work.

What do I need to do to ensure that the comment.module template_preprocess_comment() variables are available to my custom comment layout?

Source Link

Access to D8 core comment preprocess variables in D8 custom comment layout twig template?

I've asked about this on d.o layout_plugin, ds and forum but no joy as yet.

In D8 I have a custom comment type and when I use the default core comment.html.twig to render the comments then variables like 'new_indicator_timestamp' and 'parent' get rendered as expected. But if I switch to using a custom layout (via layout_plugin and display suite) and copy across the relevant twig template code for those core comment preprocess variables into my own custom layout then they don't work.

What do I need to do to ensure that the comment.module template_preprocess_comment() variables are available to my custom comment layout?