- Issue created by @capellic
- π©πͺGermany Anybody Porta Westfalica
β¨ Add entity block id in the ajax block response Needs review *might* be related
I have a paragraph that calls a custom block plugin using the Twig Tweak patch from https://www.drupal.org/project/block_ajax/issues/3315618 β¨ Twig Tweak/Plugin Blocks support Fixed .
The block receives as an argument the paragraph ID. The build logic of the block makes decisions about what content to show.
This paragraph is used twice on the page. Both paragraphs end up with the same content.
Using Twig Tweak, render the same block twice but different content is expected.
Here's my example code from the paragraph that is used twice on a page:
{{ drupal_block('pc_passthrough_block', { 'segment_set_paragraph_id': paragraph.id(), 'block_ajax': { 'is_ajax': 1, 'max_age': '0', 'show_spinner': 1, 'placeholder': 'loading....', 'ajax_defaults': { 'method': 'GET', 'timeout': '10000', 'others': { 'async': 'async', 'cache': 0 } } } }) }}
Easier to explain with the screencast:
https://www.loom.com/share/e9f2e5e3a03644c1b2a69c2c326b0a4d
Use a unique identifier for each instance a given block ID on a single page.
Active
3.0
Code
β¨ Add entity block id in the ajax block response Needs review *might* be related