Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi!
I'm using Authcache to cache pages and load blocks via ajax. That works for "normal" blocks that are positioned via the structure/blocks-page. But when I'm manually loading and rendering a (ajax enabled) block, I'm just receiving the complete content, so it is not loaded via ajax. Do I have to render it in a special way?
Comments
Comment #2
znerol CreditAttribution: znerol commentedYou might get away with copying the relevant bits from authcache_block_page_alter().
Instead of manually rendering the block, I suggest to just introduce a new region into your theme. This way you only have to place the block into that special region.
Comment #3
derMatze CreditAttribution: derMatze commentedUsing authcache_block_page_alter() as a base works! Thanks! :)
In my case the region-thing is not that easy, because the used blocks for a page are referenced via paragraphs module for every certain node...
Comment #4
derMatze CreditAttribution: derMatze commented//edit: Solved
Comment #5
znerol CreditAttribution: znerol commentedIn this context,
client
refers to the personalization method (i.e. either ajax or esi).Comment #6
derMatze CreditAttribution: derMatze commentedYou're way to fast! ;-)
Problem was solved: AJAX just was not enabled for that block :/
Thanks!
Comment #7
znerol CreditAttribution: znerol commentedComment #9
firewaller CreditAttribution: firewaller commentedFYI for people who need a hand with this, here's some working code I'm using:
* Edited to place the authcache code in the correct part of the block array