Created
December 16, 2021 14:54
-
-
Save jonpontet/a7e361f8f2e00627c430fb2d2622c2d6 to your computer and use it in GitHub Desktop.
How to include custom CSS in the Back Office of PrestaShop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function install() | |
{ | |
if ($this->registerHook('actionAdminControllerSetMedia')) { | |
return true; | |
} | |
$this->uninstall(); | |
return false; | |
} | |
public function hookActionAdminControllerSetMedia() { | |
// Add the path to your CSS file | |
// path_to_modules/this_module_name/path_to_css_file.js | |
$this->context->controller->addCSS(__PS_BASE_URI__ . 'modules/' . $this->name . '/' . 'file_name.css'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment