twisted_pepper

Registered
Hello,
I have a custom menu on my site and have installed all styles and whatnot, have entered the ID's for the light/dark switch, but due to my menu they're not showing. Is there a way for me to add it manually please i.e via a link and then entering the icon etc?
Thank you!
 
Could you elaborate on due to your menu? We place the style switcher in the default header/footer/off-canvas navigation/canvas navigation out of the box.


You can change the main menu links by going to: Style properties -> Header and navigation -> Navigation row.
 
Could you elaborate on due to your menu? We place the style switcher in the default header/footer/off-canvas navigation/canvas navigation out of the box.
Yes I use this for better desktop experience, as such it means I can't get the light switch showing, so was hoping to create a link to it on the menu;

I can PM you my site if it's not listed anywhere so you can see what I mean if it's easier?
Just need to make a link for it really if possible.

You can change the main menu links by going to: Style properties -> Header and navigation -> Navigation row.
You're a star, cheers again Russ.
 
You can add this anywhere in custom code to add style link. It's a basic link with a variable:

Code:
                    <xf:if is="property('xbStyleSwitch') != '0'">
                        <xf:set var="$StyleSwitchID">{{ property('xbStyleSwitch') }}</xf:set>
                        <a href="{{ link('misc/style', null, { 'style_id': $StyleSwitchID, '_xfRedirect': $redirect, 't': csrf_token() }) }}" class="p-navgroup-link--switch" data-xf-init="tooltip" title="{{ property('xbStyleSwitchPhrase') }}">
                            <xf:fa icon="{{ property('xbStyleSwitchIcon') }}" />
                        </a>
                    </xf:if>
 
You can add this anywhere in custom code to add style link. It's a basic link with a variable:

Code:
                    <xf:if is="property('xbStyleSwitch') != '0'">
                        <xf:set var="$StyleSwitchID">{{ property('xbStyleSwitch') }}</xf:set>
                        <a href="{{ link('misc/style', null, { 'style_id': $StyleSwitchID, '_xfRedirect': $redirect, 't': csrf_token() }) }}" class="p-navgroup-link--switch" data-xf-init="tooltip" title="{{ property('xbStyleSwitchPhrase') }}">
                            <xf:fa icon="{{ property('xbStyleSwitchIcon') }}" />
                        </a>
                    </xf:if>
Fantastic, thanks Russ. Just what I was looking for, thank you!
 
Add this into the template: xb_canvas_panel_bottom

Code:
<xf:if is="property('xbStyleSwitch') != '0'">
    <xf:set var="$StyleSwitchID">{{ property('xbStyleSwitch') }}</xf:set>
    <div class="offCanvasMenu-linkHolder">
        <a href="{{ link('misc/style', null, { 'style_id': $StyleSwitchID, '_xfRedirect': $redirect, 't': csrf_token() }) }}" class="offCanvasMenu-link offCanvasMenu-link--switch">
            <xf:fa icon="{{ property('xbStyleSwitchIcon') }}" /> {{ property('xbStyleSwitchPhrase') }}
        </a>
    </div>
</xf:if>

Also just as a heads up, our new versions of the styles actually include the style switcher in the off-canvas menu. So when you upgrade, you can remove this.
 
Add this into the template: xb_canvas_panel_bottom

Code:
<xf:if is="property('xbStyleSwitch') != '0'">
    <xf:set var="$StyleSwitchID">{{ property('xbStyleSwitch') }}</xf:set>
    <div class="offCanvasMenu-linkHolder">
        <a href="{{ link('misc/style', null, { 'style_id': $StyleSwitchID, '_xfRedirect': $redirect, 't': csrf_token() }) }}" class="offCanvasMenu-link offCanvasMenu-link--switch">
            <xf:fa icon="{{ property('xbStyleSwitchIcon') }}" /> {{ property('xbStyleSwitchPhrase') }}
        </a>
    </div>
</xf:if>

Also just as a heads up, our new versions of the styles actually include the style switcher in the off-canvas menu. So when you upgrade, you can remove this.
Excellent, thanks Russ and will keep an eye out for the update. (it's not working as of yet though..) :D
 
Last edited:
Sorry, I realized you were referring to that custom menu. You'll really just need to find the template that the menu is using and add it in there. I haven't used it, so I can't be of much help without seeing it. If you need further assistance finding it, just create a ticket with an admin login and I can take a look.
 
Sorry, I realized you were referring to that custom menu. You'll really just need to find the template that the menu is using and add it in there. I haven't used it, so I can't be of much help without seeing it. If you need further assistance finding it, just create a ticket with an admin login and I can take a look.
Thanks Russ,
I don't think this uses that template though but yours instead.
Anyway I will make a ticket with ACP credentials, I appreciate your time. As always.
 

Pre-Sale Questions

If you have any questions or concerns you want to ask before you make a purchase don't hesitate to use one of our multiple support channels for your convenience.

Back