Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: How to handle Custom Block template updates #40050
    hallme
    Participant

    @rosswintle I’ve not tried it, but I believe the shortcode could work. I gave that example as a question on how to build and maintain a custom block, less on how to update the existing update (also an important question, though.)

    After reading a pretty great blog post on how Human Made set up their homepage in Gutenberg, I went back and re-watched the dynamic block videos. I had been expecting to build the block interior with JSX and the REST API in the save function, but it seems like the preferred method is to use a PHP callback. Zac mentions in the Alt Dynamic Block video that there may be a way of doing everything in JS, but it has not established itself as a “standard” yet.

    I’ve tested this, and found that by editing the PHP function, the front end of the block will update automatically. This solves most of my concerns about the viability of custom blocks, but it does not immediately solve for block data migration or wrapper name updates.

    in reply to: How to handle Custom Block template updates #38828
    hallme
    Participant

    Thanks for asking around!

    in reply to: How to handle Custom Block template updates #38821
    hallme
    Participant

    Yeah, I agree that some sort of updater would be required. Bulk would make sense to me, as you may not want to listen for every block type, on every page, on every load.

    I feel this is something which the standard user might not run into, but imagine needing to re-update every blog post every time you updated a widget or reconfigure a CPT setting. I’m excited for the blocks, because it finally offers a good chance for loading dynamic content within pages and posts, but until some method of updating presents itself I have a hard time seeing any value to custom blocks in large scale environments.

Viewing 3 posts - 1 through 3 (of 3 total)