Needs work
Project:
Ajax Blocks
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
26 Apr 2012 at 22:43 UTC
Updated:
9 Jan 2014 at 13:52 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
maximpodorov commentedI didn't try it with Panels. Could you try and share your results?
Comment #2
patrickroma commentedActually it does not work... The ajaxblock does not load at all... I think it is because panels is creating different classes CSS and does not render the usual regions...
There is at this point no module for D6 that does a similar feature...
There is Block Refresh in D7 implementing it => http://drupal.org/node/1272556
Could this also be achieved with Ajax Blocks?
EDIT: Maybe also related: http://drupal.org/node/443208#comment-5415010
Comment #3
maximpodorov commentedWhen using as panes, blocks are not processed by hook_preprocess_block() hooks, so Ajaxblocks module can't see them. Could someone familiar with Panels internals suggest the alternative way to process blocks through Ajaxblocks module during panel rendering stage?
Comment #4
beanluc commentedI found something in the Panels issue queue to suggest that hook_preprocess_HOOK(&$vars) might not work reliably through panels, but that hook_preprocess(&$vars, $HOOK) should work.
Consider http://drupal.org/node/334209#comment-3321442, where HOOK is "page" but I've generalized the discussion to include the "block" theme implementation or whatever else.
Comment #5
patrickroma commentedInteresting point... Still I am not sure how to implement it to ajax blocks...
Comment #6
beanluc commentedTry, instead of
ajaxblocks_preprocess_block(&$vars), this wayajaxblocks_preprocess(&$vars, 'block')I haven't tried it, I'm just saying that this is what the Panels discussion indicates.
I hope it helps.
Comment #7
maximpodorov commentedAjax blocks does work with panels. For the required blocks you have to change the style to "System block" in pane context menu, so the standard block theming will be used.
The solution was found here: #258377: BlockTheme not working.
Maybe module documentation should be updated.
Comment #8
loparr commentedThis solution works.
In a case that you have one ajax block displayed as normal block in theme and the same block displayed by panels even with system block style - block displayed by panels doesn't load.
Comment #9
maximpodorov commented@loparr, how is it possible to show two blocks with the same ID?
Comment #10
loparr commentedIn my case it is a combination of panels and theme blocks on one page.
Comment #11
maximpodorov commentedComment #12
MikeActually commentedThis definitely needs work, but this patch will at least render a block that is inside of a panel.
Where it falls short is that it isn't actually rendering the pane, but the block itself; with that it is also not passing arguments to the block that might normally be set within the panel pane. Visibility rules should still be recognized.
To get this to work, you'll need to configure the ajax settings for the block in the block admin, once set, this will show up in the ajaxpagers database table, and then when the panel is preprocessed, it will render the block as if it is an ajaxblock.
The final solution to this should do the following:
I needed this patch to solve a caching issue for a poll inside of a pane. I will revisit it in a few weeks to try and flesh out the above.
If anyone has anything to add to this to help get this closer to a real feature, I'd really appreciate it.