Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assetic write-to (conflict for resources with same name) #87

Open
yellow1912 opened this issue Oct 19, 2013 · 3 comments
Open

Assetic write-to (conflict for resources with same name) #87

yellow1912 opened this issue Oct 19, 2013 · 3 comments

Comments

@yellow1912
Copy link

I wonder if anyone ran into this issue before: with the current setting there is no theme-specific path for write_to which means if your themes share the same asset filenames place in the same structure then assetic will generate the same output files. This is a big problem if you consider dynamically changing active theme per request.

I'm trying to find out how to get around this issue. The first thing would be determining how assetic generates its asset_url and making sure it must be theme-aware. Then assetic:dump must also dump assets to the correct place (I guess I can override the assetic:dump command for this).

Any suggestion?

@yellow1912
Copy link
Author

I think I found away, not sure if it is ugly or not but... I think I can override Symfony\Bundle\AsseticBundle\Twig\AsseticExtension (using DI service of course). The exact method I need to override will be createTokenParser which will allow me to make it theme-aware.

Perhaps there is a better way to do this? The ouput is already relative to the write_to it seems, there must be a better place to override this.

@lsmith77
Copy link
Contributor

@kriswallsmith do you have a hint here maybe?

@lsmith77
Copy link
Contributor

ping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants