0

Drupal 6 user. I came across interesting problem: I would like to use ajax block on cached pages on my webshop. The block would display some products which other customers have bought along with products inside current customers cart. The tricky part is that this ajax block is initially empty, so after warming all pages in cache, this block is not rendered by drupal. Which means that ajax can not be working with this block.

My question is: how can I render the block even it is initially empty? The block is made in views, I tried to add attachment displaying some data, so there would be some content inside the block, but the block is not rendered anyway.

Thank you for help

1 Answer 1

0

My solution was to create a view where I displayed random node element (i.e. title) in a block and in the same view I attached the attachment display to the block, which contains the fields that should sit in ajax block. Finally I hid the block with css rule. This way the block get's rendered in theme.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.