Thank you for this thread!
I'd like to move it a little bit further - to remove site's name from meta titles not completely, but for some threads only (that have too long titles).
So I created a thread custom field "longtitle", put a value 1234 in it and expected that the following code will do it. But it doesn't. The " | boardTitle" is still in the title. Please advise.
<title>
<xf:if is="$thread.custom_fields.longtitle">
<xf:title formatter="%s" fallback="{$xf.options.boardTitle}" page="{$pageNumber}" />
<xf:else />
<xf:title formatter="%s | %s" fallback="{$xf.options.boardTitle}" page="{$pageNumber}" />
</xf:if>
</title>