web_lukas Posted August 10, 2022 Share Posted August 10, 2022 Hello together, i have to make a Website with 3 Sites. Home.php, Imprint.php... The home.php displays perfectly. I created a new file in PHPStorm called "impressum.php" - in processwire i went to the template section, created a new template, selected the "impressum". Added the template to the Page tree. After that i started coding right away in PHPStorm. after a while i noticed the content doesnt show on the site. You have any idea why it looks like in the screenshot? I tried the thrid page, and its the same problem. Only the home.php displays perfectly how it should. Looking forward for your answers. Cheers. Link to comment Share on other sites More sharing options...
zoeck Posted August 10, 2022 Share Posted August 10, 2022 Did you select the correct template (not basic page) for the page you created? just edit the Page and Go to the page settings tab and Check the selected Template. your new „impressum.php“ file is in /site/templates? Which profile did you select during installation? eventually the Same Problem here ? ? Link to comment Share on other sites More sharing options...
Martinus Posted August 10, 2022 Share Posted August 10, 2022 Hi, I think so. I used an installation with markup. So, once I put everything inside <div id="content"> ...</div> it worked. Link to comment Share on other sites More sharing options...
web_lukas Posted August 11, 2022 Author Share Posted August 11, 2022 Thank you guys for your replies. In config.php i changed the useMarkupRegions to false, then back to true and now it works. I dont knwo why but yeah the sites shows now. This my second time i use processwire. The first time i used it, there was no problem with the site and templates. I dont know why there was a problem now. I dont even need the <div id="content">...</div> to display the site. And in the Templates i selected the right template (Impressum) like you asked zoeck. Impressum.php is in the folder /site/templates... I selected the blank project setting on the installation (Do you think i made something wrong with the installation?) You know how i can get rid of the Menu at the end of page? (Screenshot) Cheers ? Link to comment Share on other sites More sharing options...
bernhard Posted August 11, 2022 Share Posted August 11, 2022 I don't understand what you mean. Which menu? You can change the markup for your site either in _main.php or in the template file that corresponds to the template of the viewed page (template home = /site/templates/home.php). I've recently done a video showcasing RockFrontend where I'm also working on the markup a bit. Maybe that helps you as well: Link to comment Share on other sites More sharing options...
web_lukas Posted August 11, 2022 Author Share Posted August 11, 2022 Hello Bernhard, i mean, at the end of the page, after my footer i have this "Menu" at the end. But no such thing in my code. My Code ends with the footer and javascript function. The black box in the Screenshot is my footer, and after that there is this breadcrumb nav. In the main.php i found this code: <?php if($page->hasChildren): ?> <ul> <?php echo $page->children->each("<li><a href='{url}'>{title}</a></li>"); // subnav ?> </ul> <?php endif; ?> <?php if($page->editable()): ?> <p><a href='<?php echo $page->editUrl(); ?>'>Edit this page</a></p> <?php endif; ?> Does this code display the "menu" at the end of page. Thanks ? Link to comment Share on other sites More sharing options...
bernhard Posted August 11, 2022 Share Posted August 11, 2022 Ok I think I get the problem. You are using markup regions and I guess you put all the markup in your template file (like home.php or impressum.php or basic-page.php). The problem is that AFTER loading that file ProcessWire will load the main markup file (which is _main.php). That's because in config.php you have set a $config->appendappendTemplateFile = '_main.php' (which is the new default after installation). So after the markup you put in impressum or home PW will load _main.php and that's what you seeing at the bottom of the page. Link to comment Share on other sites More sharing options...
web_lukas Posted August 11, 2022 Author Share Posted August 11, 2022 I don't use any markup in my code. So if i edit the config.php and writing false instead of true, the _main.php should load at the end of the site right? But will all sites still work fine? Sorry im very new to processwire... so i dont really understand right now, what the MarkupRegions are for ? $config->useMarkupRegions = true; Link to comment Share on other sites More sharing options...
szabesz Posted August 12, 2022 Share Posted August 12, 2022 Hello, On 8/11/2022 at 10:29 AM, web_lukas said: what the Markup Regions are for see: https://processwire.com/docs/front-end/output/markup-regions and https://processwire.com/talk/topic/23641-markup-regions-pw-vs-data-pw-different-behavior/#comment-201538 hope this helps 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