diff --git a/App/Controllers/Blog.php b/App/Controllers/Blog.php index 02f518b..a6f4c11 100644 --- a/App/Controllers/Blog.php +++ b/App/Controllers/Blog.php @@ -54,7 +54,9 @@ class Blog extends Controller 'type' => $this->querys['type'], 'debug' => true, 'article'=>true, - "typedocs" => $typedocs + "typedocs" => $typedocs, + "comments" => $doccoment, + "comment_count" => count($doccoment), ]); else View::renderTemplate("/blog/basic.html",[ @@ -62,7 +64,9 @@ class Blog extends Controller 'article'=>true, 'content'=>$content, 'type' => $this->querys['type'], - "typedocs" => $typedocs + "typedocs" => $typedocs, + "comments" => $doccoment, + "comment_count" => count($doccoment), ]); }else{ View::renderTemplate("/blog/basic.html",['title'=>'test','index'=>false]); diff --git a/App/Controllers/DocComment.php b/App/Controllers/DocComment.php index fd342f3..cbe73fb 100644 --- a/App/Controllers/DocComment.php +++ b/App/Controllers/DocComment.php @@ -23,6 +23,6 @@ class DocComment extends Controller public function getDocCommentAction(){ $comment = new Models\DocComment(); var_dump($this->input); - var_dump($comment->DocComments(1)); + var_dump($comment->DocComments(8)); } } \ No newline at end of file diff --git a/App/Views/blog/basic.html b/App/Views/blog/basic.html index ed8a09d..17915c6 100644 --- a/App/Views/blog/basic.html +++ b/App/Views/blog/basic.html @@ -227,7 +227,7 @@ ul li a{
- {$child.content} -
-- {$grandson.content} -
-