RequireAsset works in application/blocks, not in a package
Permalink
Doing some default requireasset in on_start function like this:
And in the add function this:
As a block being in application/blocks, this works perfect! Except... when I make a package out of this block... it doesn't. What can we do to make this work within a package as well? It's now searching in concrete/blocks instead of packages/the_package_handle/blocks... Can we pass a package handle along, or... should another if/else be build into the core?
Would love to hear your suggestions on this, as I think both should work with the same code ( at least, my opinion :) ).
$al = \Concrete\Core\Asset\AssetList::getInstance(); $al->register( 'css', 'datetimepicker', 'blocks/datetime_test/css_form/bootstrap-datetimepicker.min.css' );
And in the add function this:
$this->requireAsset('css', 'datetimepicker');
As a block being in application/blocks, this works perfect! Except... when I make a package out of this block... it doesn't. What can we do to make this work within a package as well? It's now searching in concrete/blocks instead of packages/the_package_handle/blocks... Can we pass a package handle along, or... should another if/else be build into the core?
Would love to hear your suggestions on this, as I think both should work with the same code ( at least, my opinion :) ).
This should work if you add the package handle.