Assign a theme to applications in IPS

Assign a theme to applications in IPS


A very cool feature in Pages is that you can assign a specific theme to your pages, similar to forums / sub-forums. This is not always the case with applications, so here we show you how you can easily do it yourself …

This is done once via the Application.php of the respective application. Open the file on your server and search for …

public function init ()

Simply insert this line below, where the x stands for the ID of the theme …

    \ IPS \ Theme :: switchTheme (x);   

If for whatever reason you do not have access to the file, or if the file is encrypted (Hello ipsProArcade!), You can also insert the code directly into the global template of your theme, directly under …

html lang = "{expression =" \ IPS \ Member :: loggedIn () - > language () -> bcp47 () "}" dir = "{{if member.language () -> isrtl}} rtl {{ else}} ltr {{endif}} " 

It looks like this …

{{if \ IPS \ Request :: i () -> app == "appname"}}
    {expression = "\ IPS \ Theme :: switchTheme (x)"}

Instead of “appname” you use “arcade”, “movies”, “links” or whatever.

That’s it, maybe you can use it. If you have any questions, please comment

Related Posts
Leave a Reply

Your email address will not be published.Required fields are marked *