From e7bdf04e3e58aa2c1821918b72753f274d3684fb Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Mon, 5 Nov 2018 13:41:27 +0100 Subject: render function only body --- w/view/templates/read.php | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) (limited to 'w/view/templates/read.php') diff --git a/w/view/templates/read.php b/w/view/templates/read.php index 4964a47..35b1e7d 100644 --- a/w/view/templates/read.php +++ b/w/view/templates/read.php @@ -1,6 +1,22 @@ -layout('layout', ['title' => $art->title(), 'description' => $art->description()]) ?> +layout('readerlayout') ?> +start('head'); +if ($artexist) { + if ($canread) { + echo $head; + } else { + $this->insert('arthead', ['title' => $art->title(), 'description' => $art->description()]); + } +} else { + $this->insert('arthead', ['title' => $art->id(), 'description' => $alertnotexist]); +} + + + +$this->stop(); +?> @@ -16,22 +32,26 @@ - insert('navart', ['user' => $user, 'art' => $art, 'artexist' => $artexist]) ?> + insert('navart', ['user' => $user, 'art' => $art, 'artexist' => $artexist]); + } + ?> insert('readart', ['art' => $art]); + if ($canread) { + echo $body; } else { - echo '

You dont have enought rights to see this article

'; + echo '

'.$alertprivate.'

'; } } else { - echo '

This article does not exist yet

'; + echo '

' . $alertnotexist . '

'; if ($cancreate) { $this->insert('readcreate', ['id' => $art->id()]); } -- cgit v1.2.3