News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Board and topic titles

Started by blow, July 11, 2009, 01:56:58 PM

Previous topic - Next topic

blow

Hi there.

On my forum index the browser title is like "Forum Name - Index".
When I access some board the browser title changes to "Board Name".

Nothing is wrong, but I'd like to know if it's possible to show "Board Name - Forum Name", and same for topics: "Topic Name - Forum Name".

Can you help me?
Thanks.
;)

N3RVE

Open: index.template.php of the theme you are using.

Find:
<title>', $context['page_title'], '</title>';

Replace with:
<title>', $context['forum_name'], ' - ', $context['page_title'], '</title>';


Custom board title
You've just added ', $context['forum_name'], ' - in front of your title, which is the name of your board. If you prefer having some other custom text there, this would be the place to put it.


The problem now is that the index of your forum is going to have something like "My community - My community - Index" as a title. This is easily fixed through the language files.

Open: index.*language*.php

Find:
$txt[18] = $context['forum_name'] . ' -

Remove: $context['forum_name'] . ' -

Now, if everything went well, the name of your forum should be visible in the title on every page of your forum, and the title of your boardindex should be a single title :).

-[n3rve]
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Quote"Somewhere, something incredible is waiting to be known." - Carl Sagan

blow


N3RVE

Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Quote"Somewhere, something incredible is waiting to be known." - Carl Sagan

Advertisement: