Topic: HTML title

Hi there,

Is is probably a really simple question, but I'm new to punbb!
I want the title in the <head> of all my pages to be something along the lines of "Forum - [topic title]", where the [topic title] changes to whatever the currently viewed topic is.

I've tried "<title>Forum - <pun_title></title>" in main.tpl. However, this gives me the forum name (and not the current topic) as well as a load of text formatting stuff (<h1><span> etc).

Perhaps there is something I'm missing? Hopefully it'll be <pun_topic_title> or something easy!

Thanks,
Sam

Re: HTML title

I suppose you can always put a <pun_topic_title> in main.tpl and replace it in topic.php... but the problem here is that on any other page it will stay there and making your code invalid wink
What you could do is add it like this:

<title>Forum <!-- pun_topic_title --></title>

And do a str_replace in viewtopic.php, like this:

$tpl_main = str_replace('<!-- pun_topic_title -->', '- '.$cur_topic['subject'], $tpl_main);

Re: HTML title

Doesn't PunBB already do that? I mean, look at the title here