XF 2.0 Style Chooser Code

Chad

Active member
Wanting to place the style chooser script in the footer into a widget or at least somewhere on top of the site. Can someone please let me know what the code is?

Thank you
 
This is the HTML
HTML:
            <xf:if is="$xf.visitor.canChangeStyle()">
                            <li><a href="{{ link('misc/style') }}" data-xf-click="overlay"
                                data-xf-init="tooltip" title="{{ phrase('style_chooser')|for_attr }}" rel="nofollow">
                                <xf:fa icon="fa-paint-brush" /> {$xf.style.title}
                            </a></li>
                        </xf:if>
 
That's the 2.1 code above so if you're running 2.0 you'll use:

Code:
<a href="{{ link('misc/style') }}" data-xf-click="overlay"
                                data-xf-init="tooltip" title="{{ phrase('style_chooser')|for_attr }}" rel="nofollow">
                                <i class="fa fa-paint-brush" aria-hidden="true"></i> {$xf.style.title}
                            </a>
 
I'm still getting my head around the template syntax. Any chance I could get code that would put 2 specific style options up with FA logos?

I'd like to simply put the 'light' and 'dark' styles up in a sidebar widget so people can just click on them and they'll be selected and refresh. Not sure if this is possible or not.

The style_id's are 7 (Dark) and 9 (Light).
 
Back
Top Bottom