XF 2.2 Resource page title

Nicolas FR

Well-known member
Hello,

I would like to get the resource page title like that on the resource page :

Ressources Web | Documentation

With Documentation bolded.
But i can't find the tips for that.
  • if i set Documentation with <b></b> in expressions, tags <b>Documentation</b> appears in title displayed on browser tab.
  • if i set Documentation with <b></b> in the template xfrm_overview, tags <b>Documentation</b> appears on browser tab too...
I can't do that, in my opinion, with css in extra.less because i can't target only Documentation

I found something like that
CSS:
[data-template="xfrm_overview"] {
    .p-title-value:after {
        content: '| Documentation';
        font-weight: 700;
    }
}
But in this case Documentation doesn't appears as page title for the browser (and for google i think...).

Do you an idea how to do this ?
Thanks ! :)
 
Last edited:
Solution
No, it's not a bug.

Just edit the xfrm_overview template like so:

HTML:
<xf:title page="{$page}">{{ phrase('xfrm_resources') }}</xf:title>
<xf:h1>Resources Web | <b>Documentation</b></xf:h1>

1614872532169.webp
No, it's not a bug.

Just edit the xfrm_overview template like so:

HTML:
<xf:title page="{$page}">{{ phrase('xfrm_resources') }}</xf:title>
<xf:h1>Resources Web | <b>Documentation</b></xf:h1>

1614872532169.webp
 
Solution
I add this to the template
HTML:
<xf:title page="{$page}">{{ phrase('xfrm_resources') }} | Documentation</xf:title>
<xf:h1>Resources Web | <b>Documentation</b></xf:h1>

Perfect like this, | Documentation appears on browser tab without <b> tags (y)

Thanks Brogan.
 
Top Bottom