Skip to content

reference:(root):page.php

Aaron Junker edited this page Apr 11, 2021 · 1 revision

File (root) /page.php

This page displays content pages to the user.

The (root) /.htaccess redirects all not found pages to here.

Needed permissions

The currently logged in user needs the permission Pages to access this document. If the user doesn't have this permission a error message is displayed.

Functionality

The file works in the following order:

1. AMP and raw

If the URL begins with /raw $raw is set to True and the page gets displayed raw. And steps 2-3 and 6 get skipped.

If the URL begins with /amp $amp is set to True and the page gets displayed amp compatible.

After that this prefixes get removed from the URL

2. Document head

The <head> tag.

2.1 Normal head files

If amp is activated (root) /includes /amp /head.php gets included. If not (root) /siteelements /head.php gets included.

2.2 HTML Check script

Additional if cookie Check isn't set the HTML check gets executed.

3. Header

(root) /siteelements /header.php gets included.

4. Article

The script proceeds in the following order:

4.1 URL parameters

This is a fallback for compatibility reasons.

If the GET parameter URL is set it displays blog or normal pages.

For example:

  • page.php?URL=/blog/test => Page test from database Blog gets displayed.
  • page.php?URL=/test => Page test from database Sites gets displayed.

4.2 Index

If the requested resource is /index.php or /index.html or just / page index from database Sites gets displayed.

4.3 Error pages

If the requested resource is /error and GET parameter E is set an error page for error E is displayed.

4.4 Blog overview page

If the requested resource is /blogsite or /blogsite.php the overview page for all Blog pages is shown.

4.5 Content page

If non of the above is true a content page is displayed from the URL with following functionality: /{Content name URL prefix}/{Page name}.

4.6 404 Page not found

If no page could be found a 404 error gets displayed.

5 Replacing

The prefixes like %img get replaced.

6 Footer

(root) /siteelements /footer.php gets included.

Clone this wiki locally