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
system/modules/multicolumnwizard/html/js/multicolumnwizard_be(_src).js
and system/modules/multicolumnwizard/html/css/multicolumnwizard(_src).css
are intended to be loaded in the backend no matter whether a MultiColumnWizard widget is loaded or not, for example in case the field is initially hidden because it is part of a subpalette.
However, this doesn't happen because the addition of CSS and JS was rendered ineffectual by #213.
The asset paths are added to $GLOBALS['TL_CSS'] and $GLOBALS['TL_JAVASCRIPT'] in a parseTemplate hook:
Disadvantages: That's quite a few lines of logic for a config.php. Also, we'd be using deprecated constants (VERSION, BUILD), but then again, so does the rest of MCW. ;)
Essentially duplicate some of BackendTemplate::output to render the head tags and add them to the template after the fact:
system/modules/multicolumnwizard/html/js/multicolumnwizard_be(_src).js
and
system/modules/multicolumnwizard/html/css/multicolumnwizard(_src).css
are intended to be loaded in the backend no matter whether a MultiColumnWizard widget is loaded or not, for example in case the field is initially hidden because it is part of a subpalette.
However, this doesn't happen because the addition of CSS and JS was rendered ineffectual by #213.
The asset paths are added to
$GLOBALS['TL_CSS']
and$GLOBALS['TL_JAVASCRIPT']
in aparseTemplate
hook:MultiColumnWizard/system/modules/multicolumnwizard/MultiColumnWizardHelper.php
Lines 31 to 47 in 786f252
However, that hook is called from
Template::parseTemplate
after the head tags have already been rendered and added to the template inBackendTemplate::output
:https://github.com/contao/core/blob/d883f04807500b5f5c65bf9dd927c38e60812e42/system/modules/core/classes/BackendTemplate.php#L61-L92
Adding anything to those asset arrays in
parseTemplate
therefore has no effect.I'm not sure about which way to go in solving this. I can see two approaches at the moment:
config.php
and we detect the install/login pages differently. Something like this (untested):Disadvantages: That's quite a few lines of logic for a
config.php
. Also, we'd be using deprecated constants (VERSION
,BUILD
), but then again, so does the rest of MCW. ;)BackendTemplate::output
to render the head tags and add them to the template after the fact:Disadvantages: Duplication of core code. Also, I think we end up with those tags appearing twice if the widget is loaded as well.
The text was updated successfully, but these errors were encountered: