olivetree Posted November 6 Share Posted November 6 (edited) 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. Edited November 7 by olivetree Link to comment Share on other sites More sharing options...
bernhard Posted November 6 Share Posted November 6 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? 1 Link to comment Share on other sites More sharing options...
olivetree Posted November 6 Author Share Posted November 6 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 More sharing options...
bernhard Posted November 7 Share Posted November 7 Great. Please change the topic to [solved] if you find time, thx 🙂 1 Link to comment Share on other sites More sharing options...
olivetree Posted November 7 Author Share Posted November 7 (edited) Hi @bernhard Unfortunately only the main page home worked with RockPageBuilder, with basic-page everything stuck. It made no step, where I placed either the code snippet or the latte directive. I reinstalled pw with all modules/site-rockfrontend needed several times, but it shouldnt be so complicated or tricky;-) I always downloaded the site-rockfrontend profile from https://processwire.com/modules/site-rock-frontend where version 1.0.0 is indicated as downloadable, but its the newst version on github. But now I used this version 1.3.2 on https://github.com/baumrock/site-rockfrontend/releases. And using this version - that worked also for other templates. Edited November 7 by olivetree typo Link to comment Share on other sites More sharing options...
bernhard Posted November 7 Share Posted November 7 @olivetree you have to be more specific with your questions and with your descriptions otherwise I can't help you. 8 minutes ago, olivetree said: Unfortunately only the main page home worked with RockPageBuilder, I don't know what "worked" means. Did you get output? Did you get no errors... What did you do? Where did you put the echo statement... 8 minutes ago, olivetree said: with basic-page everything stuck. I have no idea what that means. 8 minutes ago, olivetree said: It made no step, where I placed either the code snippet or the latte directive. I don't understand, sorry. 8 minutes ago, olivetree said: I reinstalled pw with all modules/site-rockfrontend needed several times, but it shouldnt be so complicated or tricky;-) That's definitely not necessary and it is definitely not complicated or tricky. 8 minutes ago, olivetree said: I always downloaded the site-rockfrontend profile from https://processwire.com/modules/site-rock-frontend where version 1.0.0 is inticated as downloadable. But on https://github.com/baumrock/site-rockfrontend/releases there is version 1.3.2. Could you please check this out? This is a problem with the module directory. It does not grab the version number automatically and I'd have to update every single module for every single update that I push, which is not an option. I'll ask Ryan for a fix, thx. 1 Link to comment Share on other sites More sharing options...
olivetree Posted November 7 Author Share Posted November 7 Hi @bernhard. I apologize for not being so specific, you're absolutely right. I just wanted to bring RockPageBuilder working with site-rockfrontend profile. Just to reflect. I can not recover every step anymore, but after installing and setup as in docs RPB was only shown with its functions on the home page, but not on basic-page. I was muddling around in tempaltes directory and tried dozens of combinations or single entries in single and/or in many template php files or in latte files with those snippets. PHP <?= $rockpagebuilder->render(true) ?> or Latte {if $page->template == 'basic-page'} {$rockpagebuilder->render()} {/if} or {$rockpagebuilder->render()} Yes there were red errors instead of fixing them. Then I just reinstalled pw with all modules needed. I've learnt so many aspects about PW, several rock-modules and site-rockfrontend profile and their structure. I know that is not a systematic and specific (not a best) way. I just wanted to have RockPageBuilder and site-rockfront having up/running, using an unstructured try and error workflow. Link to comment Share on other sites More sharing options...
bernhard Posted November 7 Share Posted November 7 35 minutes ago, olivetree said: I know that is not a systematic and specific (not a best) way. I just wanted to have RockPageBuilder and site-rockfront having up/running, using an unstructured try and error workflow. Well we all do try/error and that's a valid workflow for most situations but not for describing problems or asking for help. Your problem description so far for me is like: Quote I bought a plane and started at Vienna airport. I wanted to land in Munich and after takeoff all was fine, but then even though I went full throttle I didn't make it to Munich. Please provide step by step instructions what you did. Often this already leads to an AHA moment and shows you the solution or what went wrong. Link to comment Share on other sites More sharing options...
olivetree Posted November 7 Author Share Posted November 7 Many thanks @bernhard. 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