I've started using child boards on my forum, and noticed that only the name of the child board is in the HTML page title.
I would like to change it so that it matches the breadcrumb trail ie: <title>Site Name - Parent Name - Child Name</title>
What's the easiest/cleanest way to do this?
It needs some custom coding, I can try to peek later today.
I'm moving this to Coding ;)
So, here it goes.
Sources/MessageIndex.php
Find:
// 'Print' the header and board info.
$context['page_title'] = strip_tags($board_info['name']);
Replace with:
//A trick to show forum name + all board structure in window title :)
$w_title = $context['forum_name_html_safe'];
foreach ($context['linktree'] as $key => $value)
if (strpos($value['url'], 'index.php?board=') !== false)
$w_title .= ' - ' . $value['name'];
// 'Print' the header and board info.
$context['page_title'] = strip_tags($w_title);
Great thanks, will give this a try.