Answer the question
In order to leave comments, you need to log in
How to add a button to the admin panel with a variation of the color scheme in the Bitrix template?
In the standard template in the admin panel there is a button for switching colors.
How can I add a button with another color there?
So far, I've managed to just add a color and force it to be activated by replacing the parameter in the line in the header.php file in the template files:
if (isset($_GET["theme"]) && in_array($_GET["theme"], array("blue", "green", "yellow", "red", "gray")))
{
COption::SetOptionString("main", "wizard_eshop_bootstrap_theme_id", $_GET["theme"], false, SITE_ID);
}
$theme = COption::GetOptionString("main", "wizard_eshop_bootstrap_theme_id", "green", SITE_ID);
<body class="bx-background-image bx-theme-<?=$theme?>" <?$APPLICATION->ShowProperty("backgroundImage");?>>
COption::SetOptionString("main", "wizard_eshop_bootstrap_theme_id", "gray", false, SITE_ID);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question