Skip to content

Commit

Permalink
Add breadcrumbs to controllers
Browse files Browse the repository at this point in the history
  • Loading branch information
rxu committed Dec 10, 2024
1 parent 5927db9 commit da39329
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions controller/thankslist.php
Original file line number Diff line number Diff line change
Expand Up @@ -589,12 +589,19 @@ public function main($mode, $author_id, $give)
}

// Output the page
$u_thankslist = $this->controller_helper->route('gfksx_thanksforposts_thankslist_controller');
$this->template->assign_vars([
'TOTAL_USERS' => $this->language->lang('LIST_USERS', $total_users),
'U_THANKS' => $this->controller_helper->route('gfksx_thanksforposts_thankslist_controller'),
'S_THANKS' => $sthanks,
]);

// Add breadcrumb
$this->template->assign_block_vars('navlinks', [
'BREADCRUMB_NAME' => $this->language->lang('GRATITUDES'),
'U_BREADCRUMB' => $u_thankslist,
]);

make_jumpbox(append_sid("{$this->phpbb_root_path}viewforum.$this->php_ext"));

// Send all data to the template file
Expand Down
7 changes: 7 additions & 0 deletions controller/toplist.php
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,7 @@ public function main()
$this->pagination->generate_template_pagination($pagination_url, 'pagination', 'start', $total_match_count, (int) $this->config['topics_per_page'], $start);

// Output the page
$u_toplist = $this->controller_helper->route('gfksx_thanksforposts_toplist_controller');
$this->template->assign_vars([
'PAGE_NUMBER' => $this->pagination->on_page($total_match_count, (int) $this->config['posts_per_page'], $start),
'PAGE_TITLE' => $page_title,
Expand All @@ -503,6 +504,12 @@ public function main()
'U_SEARCH_FORUM' => $u_search_forum,
]);

// Add breadcrumb
$this->template->assign_block_vars('navlinks', [
'BREADCRUMB_NAME' => $this->language->lang('TOPLIST'),
'U_BREADCRUMB' => $u_toplist,
]);

make_jumpbox(append_sid("{$this->phpbb_root_path}viewforum.$this->php_ext"));

// Send all data to the template file
Expand Down

0 comments on commit da39329

Please sign in to comment.