diff --git a/app/Models/Pages/Forum.php b/app/Models/Pages/Forum.php index 11d88582..f871abcb 100644 --- a/app/Models/Pages/Forum.php +++ b/app/Models/Pages/Forum.php @@ -44,7 +44,14 @@ class Forum extends Page $this->nameTpl = 'forum'; $this->onlinePos = 'forum-' . $args['id']; - $this->canonical = $forum->link; + $this->canonical = $this->c->Router->link( + 'Forum', + [ + 'id' => $args['id'], + 'name' => $this->c->Func->friendly($forum->forum_name), + 'page' => $forum->page, + ] + ); $this->model = $forum; $this->topics = $forum->pageData(); $this->crumbs = $this->crumbs($forum); diff --git a/app/Models/Pages/Topic.php b/app/Models/Pages/Topic.php index aa8ffddb..eb7a9e5d 100644 --- a/app/Models/Pages/Topic.php +++ b/app/Models/Pages/Topic.php @@ -136,7 +136,14 @@ class Topic extends Page $this->nameTpl = 'topic'; $this->onlinePos = 'topic-' . $topic->id; $this->onlineDetail = true; - $this->canonical = $topic->link; + $this->canonical = $this->c->Router->link( + 'Topic', + [ + 'id' => $topic->id, + 'name' => $this->c->Func->friendly($topic->name), + 'page' => $topic->page, + ] + ); $this->model = $topic; $this->crumbs = $this->crumbs($topic); $this->online = $this->c->Online->calc($this)->info();