• Resolved dbugger

    (@dbugger)


    Is it possible somehow to define blocks entirely using Code? I saw this image in the Homesite of LazyBlocks:

    https://shorturl.at/ivAF1

    And it is what it seems a code definition of a block. I would like to do something like that, but I cannot find any documentation to do this.

    • This topic was modified 4 years, 6 months ago by dbugger.
    • This topic was modified 4 years, 6 months ago by dbugger.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Nikita

    (@nko)

    Hi.

    You can export your blocks to PHP https://lazyblocks.com/documentation/export-blocks/

    p.s. your screenshot is not loading.

    Regards, nK.

    Thread Starter dbugger

    (@dbugger)

    Yes, they can be exported to PHP, but that only is useful to import them back into another system, no?

    Thread Starter dbugger

    (@dbugger)

    What I want is to have the definition of my custom blocks linked to the code of my theme directly, so that if the theme gets activated/installed, the blocks will be available, without having to import anything.

    I will try again the screenshot: https://bit.ly/3h1qPiZ

    Plugin Author Nikita

    (@nko)

    Blocks can be exported/imported manually using JSON.

    If you use PHP, blocks will be only registered once your code is active.

    What do you need – is another feature, which is not available in our plugin.

    The screenshot of the code is custom controls registration, it is not related to your question at all.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Define blocks just with code’ is closed to new replies.