Jump to content

RPB render allocation with site-rockfrontend profile


olivetree
 Share

Recommended Posts

Hi 

I intended to test RockPageBuilder with a fresh site-rockfrontend profile and most Rock-Modules.
I installed page-edit-front and adjusted the profile in Rockfrontend to rockpagebuilder. 

Where to put the following render

<?= $rockpagebuilder->render(true) ?>

 I tried to set it in different php/less files in /site/templates with this profile.

Many thanks for a hint.

Link to comment
Share on other sites

Hey @olivetree thank you for your question.

ProcessWire is totally open to how you structure your frontend or where you put which kind of markup, that's why the short answer would be "wherever you want".

The RockFrontend site profile loads the _main.latte file for every request. Before that, it loads the template specific file, eg home.php or basic-page.php

So for example you could place your code snippet in _main.latte, then all blocks would be rendered on every page.

If you only want to render rockpagebuilder for basic-page pages, then you could add this:

{if $page->template == 'basic-page'}
  {$rockpagebuilder->render()}
{/if}

Does that help?

  • Like 1
Link to comment
Share on other sites

Many thanks @bernhard for your hints. Now it works. For me it was unclear where to put the render() snippet in, I understood where it  I tried several files, but now it works.
In the RockPageBuilder doc you mention using the site-blank profile, where all works, but I like the delayed output defined in site-rockfrontend.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...