admin管理员组文章数量:1129441
I developed a custom shortcode plugin in previous years which I am trying to convert to a Gutenberg block. Now that plugin renders a large number of forms including some that are calendar based, e.g. like reserving a slot at certain day and time. Because of the large number of forms, I concluded that I need dynamic server-side rendered blocks. Now such a calendar based form shows initially the possible reservation for next day, but it contains buttons to goto next or previous days. And if these are clicked, the block needs to be refreshed with the data for the selected day. So the question is, how can I force a server-side re-render of the block using the view script, thus that the php render script is called again with the new date as attribute to render the requested reservation view.
In the shortcode version, I do an ajax get call to retrieve the html content that I generate at the server. That is done for the initial render for day X as well as requested updates for day Y, Z... My idea is to replace those ajax get calls with some standard Gutenberg function that triggers the call to the ServerSideRender callback function.
本文标签: refresh dynamic block render
版权声明:本文标题:refresh dynamic block render 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736715038a1949153.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论