XF 1.4 Accessing custom field from EXTRA.css

NewGamePlus

Member
I've been trying to set up a system where the site font is replaced from a custom field, but $visitor seems to be null inside EXTRA.css. What am I doing wrong?

I've tested using the dumper: {xen:helper dump, $visitor} produces "<pre>NULL
</pre>".

The idea is to apply the font globally using this css:

* {
font-family: '{$visitor.customFields.font}', sans-serif !important;
}

I know it's dirty but we have like 8 themes and the font is defined everywhere multiple times, so I went with this hack.

site: new-game-plus.com
 
Hmm, I thought it would be something like that.

Instead of having it user-selectable I just set it in the theme and made selectable themes. After erasing font properties on lots of places, it seems to be correctly inheriting them from Body.

Thanks! Everything is working fine now.
 
Back
Top Bottom