incognito.ms Posted April 11 Share Posted April 11 The FAQ has this information: Quote Can I implement sidebar layouts with RockPageBuilder? Yes! You can create as many RPB fields as you like. For example, one for the normal page content and one where you can provide different elements for the sidebar (e.g. calendar, become a member, news, etc). So it seems to be possible to add two or more RockPageBuilder fields to the same template. But how do I place them in the template file? <?= $rockpagebuilder->render(true); ?> does not reflect a certain field. Link to comment Share on other sites More sharing options...
bernhard Posted April 11 Share Posted April 11 Hi @incognito.ms thx for using RockPageBuilder ? 12 minutes ago, incognito.ms said: <?= $rockpagebuilder->render(true); ?> This is just a shortcut for this: $page->rockpagebuilder_blocks->render(); That means it will render the default RockPageBuilder field that you get when installing RPB. If you add additional custom RPB fields (lets say "foo" and "bar"), you can simply render them like this: $page->foo->render() $page->bar->render() So you could have a 3 column layout like this: <div id="left"> <?= $page->foo->render() ?> </div> <div id="main"> <?= $rockpagebuilder->render() ?> </div> <div id="right"> <?= $page->bar->render() ?> </div> https://www.baumrock.com/en/processwire/modules/rockpagebuilder/docs/blocks/#rendering-blocks Does that help? Link to comment Share on other sites More sharing options...
incognito.ms Posted April 11 Author Share Posted April 11 Quote This is just a shortcut for this: $page->rockpagebuilder_blocks->render(); Ah, okaaay... a shortcut. Simple. Silly me ? Marked as solved. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now