Home>Support>PageBuilder not working in modal via api

PageBuilder not working in modal via api

By Mantas Dainys, 5 years ago. Last reply by Alex S, 5 years ago.
Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].

Hi,

I have question. When I opening one page in modal via rest api, html is not initialized.
How i can, after load HTML initialize page builder objects?

It is big problem!

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 5 years, 4 months ago Alex S
    Hi, I Work Here

    Hi Mantas,

    Unfortunately, this isn’t possible without a fair amount of custom coding. Due to how the WordPress REST API is designed to work, the standard SiteOrigin Page Builder renderer isn’t designed to run prior to output. This means that you’re getting the raw fallback layout generated by SIteOrigin Page Builder rather than the full page builder layout. To render the layout directly you would need to write a JavaScript Renderer which I don’t recommend. Instead, I recommend using Ajax and making a request directly to WordPress and rendering the layout directly using siteorigin_panels_render (which uses SiteOrigin_Panels_Renderer).

    Unfortunately, this is beyond the scope of what we can help you with on our forums, but you could hire a developer to implement this for you. We recommend using Codeable. You’ll be able to hire someone at an hourly rate to do this work for you.

    Kind regards,
    Alex

  2. 5 years, 4 months ago Mantas Dainys

    Thanks, but i find solution. After load my html from API, next step is initialize page builder objects, it is complicated, but is impossible.

  3. 5 years, 4 months ago Alex S
    Hi, I Work Here

    Hi Mantas,

    That’s great to hear! :)
    Let me know how you go. If you have any questions about using the SiteOrigin Page Builder Renderer, let me know.

    Kind regards,
    Alex

  4. 5 years, 2 months ago Mantas Dainys

    My solution: https://www.kolibriofilmai.lt/
    This website work over API.

  5. 5 years, 2 months ago Alex S
    Hi, I Work Here

    Hi Mantas,

    That’s awesome! Really good work mate. :)

    Kind regards,
    Alex

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More