Jump to content

Template Site Content doesnt show


web_lukas
 Share

Recommended Posts

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.

Bildschirmfoto 2022-08-10 um 16.15.51.png

Link to comment
Share on other sites

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

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 🙂

Bildschirmfoto 2022-08-11 um 07.36.39.png

Bildschirmfoto 2022-08-11 um 07.40.00.png

Link to comment
Share on other sites

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

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 🙂

Bildschirmfoto 2022-08-11 um 07.40.00.png

Link to comment
Share on other sites

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

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

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...