Can I use stylesheetLink with GET parameter for versioning? Example, I need
<link rel="stylesheet" type="text/css" href="/css/app.min.css?v=1.0.1" />
yes you can!
look docs:
https://docs.phalcon.io/en/3.0.2/reference/tags.html#stylesheets
https://docs.phalcon.io/en/3.0.2/reference/assets.html
than
$this->di->setShared("assets") use ($config) { //.... >addcss("css/style.css?" . $cofnig->version); ...
this method I think not correct. In case when I need use dynamic versions this method is not work in VOLT example I buld new version of css or js files and I want sent to stylesheetLink function this version dynamically. Not
{{ stylesheetLink("css/app.min.css?v=1.0.2") }}
But
{{ stylesheetLink("css/app.min.css", false, $version) }}
Hi,
that should be exactly what you want: https://github.com/phalcon/phalcon-devtools/blob/master/scripts/Phalcon/Mvc/Controller/Base.php
use setTargetUri() in assets definitions and {{ assets.outputCss("main_css") }} in views