Skip to content
This repository has been archived by the owner on Nov 8, 2020. It is now read-only.

Assetics + Twig #6

Closed
lyrixx opened this issue Sep 17, 2011 · 15 comments
Closed

Assetics + Twig #6

lyrixx opened this issue Sep 17, 2011 · 15 comments

Comments

@lyrixx
Copy link
Contributor

lyrixx commented Sep 17, 2011

How can i use : http://symfony.com/doc/current/cookbook/assetic/asset_management.html

It does not work.

You can see : https://github.com/lyrixx/Silex-Kitchen-Edition/commits/assetic

@sveneisenschmidt
Copy link
Collaborator

What does exactly not work?
Any errors?

@lyrixx
Copy link
Contributor Author

lyrixx commented Sep 18, 2011

I do not want to load all my asset from the config.
So when I use, in a twig template, {% javascripts ... %} It does not add an asset collection to the asset manager.

Please see here : lyrixx/Silex-Kitchen-Edition@32b4fbc#L8L49

@lyrixx lyrixx closed this as completed Sep 18, 2011
@lyrixx lyrixx reopened this Sep 18, 2011
@sveneisenschmidt
Copy link
Collaborator

I'll have a look. Do you have jabber/gtalk?

@lyrixx
Copy link
Contributor Author

lyrixx commented Sep 20, 2011

Yes, i sent you a message.

Thx

@tworzenieweb
Copy link

any updates about this issue? It will be great to use assetic in twig templates for silex

@cj
Copy link

cj commented Oct 28, 2011

Any updates on this?

@sveneisenschmidt
Copy link
Collaborator

unfortunately not.

@justinpfister
Copy link

i've been working with the Fate/Assetic extension too.. referencing the Kitchen-Edition setup.. that code doesn't seem to be working quite right..The asset files get created and saved.. but once you make modifications the asset arrays.. it seems to get buggy.

@sveneisenschmidt
Copy link
Collaborator

Maybe I'll have to rewrite it.

@justinpfister
Copy link

I found the big reason I was having problems was because I wasn't paying attention to the assetic ['debug'] behavior. It was caching the the scripts.js so of course it wasn't updating like I wanted.. However, I'm still finding that when I add additional j-scripts like jquery-extensions, the created script doesn't behave like I expect it too and I have a to keep it separate. It seems like even in the example on Kitchen-Edition -- jquery is left out.. not sure why that was done.

@lyrixx
Copy link
Contributor Author

lyrixx commented Nov 11, 2011

Jquery is left out because many websites do the same thing. So it's pretty sure that jquery will already be in client browser cache. ;)

@sveneisenschmidt
Copy link
Collaborator

So, the problem still exist?

@digitaltoad
Copy link

I've looked through Symfony and borrowed some bits to get Assetic and Twig to play nice together in Silex apps. Let me know what you think (the code probably needs to be cleaned a bit).

digitaltoad/silex-extensions@2dba9cb

@digitaltoad
Copy link

I've updated my code a bit to fix a few debug issues and pull in a bit more of the caching code provided in the AsseticBundle.

@mheap
Copy link
Owner

mheap commented Nov 17, 2012

As far as I know, Silex + Twig + Assetic are playing together nicely now (if you use dumper->addAssets()).

@mheap mheap closed this as completed Nov 17, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants