#3653 - Re-work block AJAXification code

This is a spacer post for a website comment topic. The content this topic relates to: #3653 - Re-work block AJAXification code
I've replaced the block AJAXification code with a [data-ajaxify] behavior that is initialized using a [data-ajaxify] attribute on the element which contains the ajax results. It takes a JSON5 object of options. Links and forms that are supposed to be ajaxified need to marked using a [data-ajaxify-target="1"] attribute or you can specify a selector with the 'targetsSelector' option passed to [data-ajaxify]. Example:


<div data-ajaxify="{ callUrl: 'http://url/goes/here', callParamsFromTarget: [...this is an array of regexes for call URL params that will be taken from targets...], targetsSelector: 'a.my-child, form.another-child' }">
< a class="my-child" href="http://some/url?param_name=param_value">Click Me</ a>
< a data-ajaxify-target="1" href="http://some/url?param_name=param_value">Click Me Too</ a>
<div>

Great, thanks :)! So you can mark resolved?
0 guests and 0 members have recently viewed this.