XF 1.4 Can custom user fields be tested in extra.css?

RobParker

Well-known member
Will this work in extra.css or does it need to be placed somewhere else?

<xen:if is="{$visitor.customFields.gallery_alert.off} == 'off'">
.navTabs .navLink .itemCount {
display: none !important;
}
</xen:if>
 
Last edited:
Depending on what you are trying to do, yes.
The code in the format you have posted above won't actually work as the conditional statement would need to be wrapped around some HTML.

If it's from an add-on you may be better off asking in the add-on thread.
 
Depending on what you are trying to do, yes.
The code in the format you have posted above won't actually work as the conditional statement would need to be wrapped around some HTML.

If it's from an add-on you may be better off asking in the add-on thread.

I asked Chris but it's beyond the scope of his gallery support. I think it's pretty straight forward to do now I know where it can't go, thanks for the help :-)
 
Fairly sure this works (though might be possible top target it a bit more).

Navigation template
Code:
  <a href="{$extraTab.href}" class="navLink<xen:if is="@xb_nav_disablearrow"> NoPopupGadget" rel="Menu</xen:if>">{$extraTab.title}<xen:if is="{$extraTab.counter}"><strong class="itemCount <xen:if is="{$visitor.customFields.gallery_alert.off} == 'off'">hide_gallery_alerts"></xen:if><span class="Total">{$extraTab.counter}</span><span class="arrow"></span></strong></xen:if></a>
 
You can combine it with the

<xen:if is="{$extraTab.counter}">

To

<xen:if is="{$extraTab.counter} AND {$visitor.customFields.gallery_alert.off} != 'off'">

I think that is the correct syntax, on my phone so I'm limited:p
 
Back
Top Bottom