简体   繁体   中英

Including assets in sonata-project/block-bundle 4.0

Symfony sonata block bundle has twig function "sonata_block_include_stylesheets", which must register all blocks assets. But in version 4 , i did not find how it can be do.
In 3.* version , in services classes exist methods as "getJavascripts" and "getStylesheets".
I tried simple write <link rel="stylesheet" media="all" href="{{ asset('some.css') }}"> on template, in hope that it will automatically include this script. But they only render this link in block html, but i want to group css links on top of the page.
Any ideas, how this make ?

我们在 4 版本中放弃了资产管理,因为这应该是 webpack 或自定义模板代码的一部分。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM