Fix for the previous

This commit is contained in:
Visman 2023-11-02 18:56:07 +07:00
parent 8e3c74367e
commit acaad2db29
2 changed files with 16 additions and 2 deletions

View file

@ -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);

View file

@ -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();