diff --git a/example.php b/example.php index a5c3e90..3a59d3d 100644 --- a/example.php +++ b/example.php @@ -2,6 +2,7 @@ // This file should serve as an example showing all the current implemented features. // Parameters that will be used in the template file +$templateParameters["render"] = true; // Whether or not to render the template $templateParameters["title"] = "Eksempel side"; // Sets the page title // Include the top of page diff --git a/login.php b/login.php new file mode 100644 index 0000000..f189fb3 --- /dev/null +++ b/login.php @@ -0,0 +1,13 @@ + +
Her kan du logge inn
+ \ No newline at end of file diff --git a/template/_footer.php b/template/_footer.php index 1f63cc0..6962b21 100644 --- a/template/_footer.php +++ b/template/_footer.php @@ -1,3 +1,8 @@ + diff --git a/template/_header.php b/template/_header.php index 50bbefe..7c18a3a 100644 --- a/template/_header.php +++ b/template/_header.php @@ -7,6 +7,9 @@ if ((strlen($templateUrlPrefix) > 1)) { $templateUrlPrefix = $templateUrlPrefix . DIRECTORY_SEPARATOR; } +if ($templateParameters["render"] === false) { + return; +} ?> @@ -39,6 +42,7 @@ if ((strlen($templateUrlPrefix) > 1)) {