Pass parameters to asset publish file

I wanna pass parameters to the file that I’m gonna publish through asset, is there anyway I can archive it?

Example: test.php


echo $var;

And then pass the variable

$var = "Hello World";



Is this porsible to do it?

I don’t think it’s possible. Asset Manager is designed specifically for static assets. Dynamic assets should be served via controller actions.

Thank you very much, it works.

@phtamas I’m making a widget, how can i pass parameters to the asset using a controller?