gbotica Posted November 5, 2015 Share Posted November 5, 2015 Hi, I am creating various hooks to modify the WHMCS v6 Six theme, but I need to ensure that some of these customisations only apply when the Six theme is active -- is there a way to do this? Something like: getClientTemplate()->name; Or something like that? Thanks in advance. 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted November 5, 2015 Share Posted November 5, 2015 you can get the template name from $CONFIG array available through all the system, but if your client changed the template by adding (&systpl=Template-Name) in the address bar, then you can get it from client SESSION, below is a working example <?php function hook_getTemplateName($vars){ global $CONFIG; if (isset($_SESSION['Template'])){ $template = $_SESSION['Template']; } else { $template = $CONFIG['Template']; } } add_hook("ClientAreaPage", 1, "hook_getTemplateName"); 0 Quote Link to comment Share on other sites More sharing options...
gbotica Posted November 5, 2015 Author Share Posted November 5, 2015 Thank you very much, that's very helpful. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.