XF 2.2 Bolded text if node is...

Old Nick

Well-known member
Hello,

I'm building a forum navigation widget and I'm trying to bold the name of the forum in the list when the widget is displayed on the relevant forum, I use this code but it doesn't work, when I'm on the forum page forum id 225 his name is not in bold in the widget. What am I doing wrong?

Code:
<xf:if is="$forum.node_id == 225">
    <a href="/forums/bourgogne-franche-comt%C3%A9.225/"><b>Bourgogne Franche-Comté</b></a>
<xf:else/>
    <a href="/forums/bourgogne-franche-comt%C3%A9.225/">Bourgogne Franche-Comté</a>
</xf:if>

Thanks !
 
The global code

HTML:
<div class="block"{{ widget_data($widget) }}>
    <div class="block-container">
        <h3 class="block-minorHeader"><a href="/les-regionalistes/">Navigation régions</a></h3>
            <div class="block-body">
                <div class="block-row">
                    <xf:if is="$__globals.forum.node_id == 215">
                        <a href="/forums/auvergne-rh%C3%B4ne-alpes.215/"><b>Auvergne Rhône-Alpes</b></a>
                    <xf:else/>
                        <a href="/forums/auvergne-rh%C3%B4ne-alpes.215/">Auvergne Rhône-Alpes</a>
                    </xf:if>
                </div>
                <div class="block-row">
                    <xf:if is="$__globals.forum.node_id == 225">
                        <a href="/forums/bourgogne-franche-comt%C3%A9.225/"><b>Bourgogne Franche-Comté</b></a>
                    <xf:else/>
                        <a href="/forums/bourgogne-franche-comt%C3%A9.225/">Bourgogne Franche-Comté</a>
                    </xf:if>
                </div>
        </div>
    </div>
</div>
 
Waiting for possibly better I did like this:
HTML : <a href="/forums/bretagne.206/" id="bre">Bretagne</a>
LESS : [data-container-key="node-206"] {#bre {font-weight: 700;}}
 
Back
Top Bottom