Closed (fixed)
Project:
Ajax Block
Version:
3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
3 Jun 2022 at 15:25 UTC
Updated:
3 Nov 2022 at 13:34 UTC
Jump to comment: Most recent
I have multiple blocks on a single page that I would like to load when a button click event is triggered.
I am not clear on how to do this. Can anyone clarify how this is done or point me to the appropriate documentation?
Comments
Comment #2
geoanders commented@solarDog
Blocks that are configured for ajax, get loaded automatically on page load currently. There is no functionality at this time to trigger via button. This would need to be added in.
- Would require a configuration option to trigger via button.
- Pass this configuration to drupal settings on js layer.
- Check for configuration and either load automatically and allow button to trigger block load. Probably have to tie click event against button or render a custom form with ajax button functionality.
Comment #3
geoanders commentedComment #4
geoanders commentedComment #5
nathan tsai commentedLooking for a module similar to https://www.drupal.org/project/block_refresh for Drupal 9.
Specifically, refreshing a block every 5 secs (for an auction website).
@geoanders, would you be interested in discussing how we could build this functionality?
I don't mind writing a bit/most of the code.
Comment #6
nathan tsai commented[clicked submit comment too many times]
Comment #7
nathan tsai commented[clicked submit comment too many times]
Comment #8
geoanders commented@nathan-tsai
I would create another feature request ticket for block refresh. As this ticket has a different ask.
Comment #9
geoanders commentedComment #10
geoanders commentedComment #12
geoanders commentedComment #13
geoanders commented