Jump to content

How do I make ProcessWire display the 404 "page not found" page?


ryan

Recommended Posts

12 hours ago, CalleRosa40 said:

I put the declarations into separate files for better overview (_init.php would get rather lengthy if I didn't)

I'm surprised you have so many template variables to declare. You might like to take a look at Markup Regions because that should greatly reduce the number of variables you need to hold markup.

12 hours ago, CalleRosa40 said:

Here's the the essential part of my _init.php (which is automatically prepended to all my template files):

include_once('_func.php');
include_once('_header.php');
include_once('_sidebar.php');
include_once('_footer.php');
include_once('_buttons.php');

Does the below work? (P.S. parentheses are redundant for include, include_once, etc because they are expressions rather than functions)

include_once './_func.php';
include './_header.php';
include './_sidebar.php';
include './_footer.php';
include './_buttons.php';

 

  • Like 2
Link to comment
Share on other sites

11 minutes ago, Robin S said:

P.S. parentheses are redundant for include, include_once, etc because they are expressions rather than functions

Thanks for making me aware of something that I've done wrong for about 20 years ?

  • Like 2
  • Haha 1
Link to comment
Share on other sites

On 3/17/2022 at 10:28 PM, Robin S said:

I'm surprised you have so many template variables to declare. You might like to take a look at Markup Regions because that should greatly reduce the number of variables you need to hold markup.

It's not the number of variables that makes my code lengthy but rather the amount of (conditional) HTML I have to put inside them. Thanks anyway!

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
  • Recently Browsing   0 members

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