[Support request] Using an element hook template in ACF block

Home Forums Support [Support request] Using an element hook template in ACF block

Home Forums Support Using an element hook template in ACF block

  • This topic has 3 replies, 2 voices, and was last updated 2 years ago by Tom.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2188639
    Gary

    Hi Support

    This one is probably quite an edge case but wondering if this could be possible. Whilst waiting for the new GB query loop I’m working on a site which needs a custom staff listing.

    I decided to use a custom ACF block for this as there were no plugin options which worked as needed them to. Whilst working on the ACF block template I had the idea of using hooks and Elements to create content template which works great on the frontend but the Elements template doesn’t preview in the ACF block when editing unfortunately.

    I’m assuming this might be a limitation to Elements feature being intended for the frontend, but I’m now curious if there is any way that I might get this working in the editor display as combining ACF blocks and templates built in Elements and GB could be a very handy feature.

    Thanks

    #2189286
    Tom
    Lead Developer
    Lead Developer

    Hey Gary,

    Getting the actual dynamic data to display in the editor is very complex. This is exactly what we’re doing in GenerateBlocks right now with dynamic data and the Query Loop block, and the editor preview is by far the hardest/most complex part about it.

    I’m afraid there isn’t an easy solution, but GB 1.5.0 is almost ready for public testing.

    Let me know if you need more info πŸ™‚

    #2189661
    Gary

    Hi Tom

    Thanks for the reply, I thought that was probably going to be the answer!

    Great news though to hear GB 1.5.0 is nearly ready for testing, can’t wait to give it a spin πŸ™‚

    I’m now wondering if the work you’ve done with the query loop block and previewing dynamic data would make this more possible? Granted the query loop block will solve a lot of the things I’d turn to ACF Blocks for at the moment, but the idea of creating custom blocks with ACF and using Elements to create the content templates for them visually with GB would certianly add an interesting additional option.

    Cheers

    #2190261
    Tom
    Lead Developer
    Lead Developer

    The dynamic data itself may still be previewable in the editor, but it depends on how things are set up.

    Development is public, so there’s nothing stopping you from giving it a play now: https://github.com/tomusborne/generateblocks/tree/query-loop-block

    Of course, we’re not even in alpha yet, so no using it on production sites πŸ™‚

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.