XenForo Get style type in HTML template

L

Lorthirk

Guest
Hello,

I have an HTML widget in which I need to identify if I am in a dark or light template, in order to set some colors to pass via query string to a third party script. So I'm doing something like

HTML:

Code:
<div id="my_widget" style=""> </div>
<xf:if is="$xf.style.properties.styleType == 'light'">
    <xen:set var="$context.textColor1" value="333333"></xen:set>
<xf:elseif is="$xf.style.properties.styleType == 'dark'" />
    <xen:set var="$context.textColor1" value="dddddd"></xen:set>
<xf:else...

Read more

Continue reading...