[RSS Feed/News] Get style type in HTML template

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
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

ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom