• Resolved gkelly1981

    (@gkelly1981)


    I have setup my block which works great. I added the secondary template preview-block-name.php.

    In the editor I do not see this file “preview-” but rather the file “block-“. Aside from the different prefix they are named the same.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter gkelly1981

    (@gkelly1981)

    Update.

    I figured out how to manually make this happen but not sure yet on how to dynamically set this.

    In helpers.php
    function block_lab_template_part
    Set $type=”preview”; inside the body of the function. That will show the preview in edit but also unfortunately show it on the site.

    There is also a comment in there that reads:
    “$type The type of template to load. Only ‘block’ supported at this stage.”

    This conflicts with the documentation.

    Plugin Contributor stino11

    (@stino11)

    Hey @kelly1981
    Thanks for pointing this out and for doing a bit of debugging/solutioning.
    We think we know what’s causing the issue and will work on a fix asap.

    Plugin Author Luke Carbis

    (@lukecarbis)

    This is fixed in the latest release.

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

The topic ‘Preview-Template Issue’ is closed to new replies.