You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Controller API
But it also relies a lot on the content added via AdminController::addCss and AdminController::addJs which are also used by modules, so this content must still be editable/customizable from the modules and still be injected in the header part.
Controller setMedia
Finally, the switch between default and new theme relies a lot on AdminController::setMedia which is usually called with the parameter true, we shouldn't rely on this anymore. Instead the basic css/js files required for the new theme should be added in the header twig file direct via the asset method. We will always force new theme and its dependencies so we can hard code them.
Description
See #33101 for description in Step 2
This is the header part (
<head></head>
).This component should be quite autonomous.
Additional note
Header template
The header was initially created/rendered via AdminController::display method So basically from the content of https://github.com/PrestaShop/PrestaShop/blob/9f23933ac4cde3c982c3f2cff14c300acac1256f/admin-dev/themes/new-theme/template/header.tpl#L34-L33
Controller API
But it also relies a lot on the content added via
AdminController::addCss
andAdminController::addJs
which are also used by modules, so this content must still be editable/customizable from the modules and still be injected in the header part.Controller setMedia
Finally, the switch between default and new theme relies a lot on
AdminController::setMedia
which is usually called with the parameter true, we shouldn't rely on this anymore. Instead the basic css/js files required for the new theme should be added in the header twig file direct via theasset
method. We will always force new theme and its dependencies so we can hard code them.Blocked by #33103
The text was updated successfully, but these errors were encountered: