Is it possible to load assets conditionally with Assetic?
For example (peusocode):
load resource1.js
load resource2.js
if condition = true
load resource3.js
endif
output combined.js
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No it’s not possible because assetic files are compiled on the server side, so assetic don’t have access to the value of your variable at runtime.
A solution could be to add a second assetic tag