Commit 53488151f2

53488151f29e3afbd1b1348597ff2123b97ad2d7

parent: 83b1821aa9

Unsigned

cmc <hello@cleberg.net> · 2023-06-14 20:05 UTC

extract template file string for better compatibility

Layout: unified · split

index.php +1 −1
@@ -230,7 +230,7 @@ function echo_html(string $page_url, string $page_description, string $page_titl
230230 $page_content
231231 );
232232
233 $template->echo_template();
233 $template->echo_template('templates/template.html');
234234}
235235
236236// EOF
src/View/class-template.php +1 −2
@@ -38,9 +38,8 @@ class Template
3838 $this->current_year = date("Y");
3939 }
4040
41 public function echo_template() {
41 public function echo_template(string $template_file) {
4242 // Get the template file
43 $template_file = 'templates/template.html';
4443 $page = file_get_contents($template_file);
4544
4645 // Replace the template variables