As far as I did read into the topic the sane way to do assets is:
Use Assetic for css and js files. Use the ../MyBundle/Resource/public
directory for image files and other static resources. Assetic is
configured for an application. Built in assets are used in a bundle-scope.
As symbols in css and js files get imported into a global scope, there
is no need to reference the files individually from arbitrary locations.
For images one needs to reference individual files. This is where my
trouble start.
My setup:
/src
/My
/CommonBundle
/Resources
/jquery
/themes
/base
/images
/ui-icons_888888_256x240.png
/jquery.ui.base.css
/ui
/jquery.ui.widget.js
/jquery-1.6.js
/FrontendBundle
/Resources
/public
/images
/me.jpg
/logo.jpg
The css and js files get crammed together, everything fine and no
problem. To reference an image I have to write {{
asset('bundles/myfrontend/images/me.jpg') }}. Is there a shortcut for
the current bundle (the one containing the template) to write something
like {{ asset('_this_/images/me.jpg') }}?
I want my photo-file me.jpg to have the URL
http://example.com/images/me.jpg. Is there any option to put some
resources in a global scope? Is there a way without using controllers?
Should /web/* be treated as generated or is it OK to mix native
application assets there?
How would I reference images from within my css? And how to cope with
images referenced from css or js from within a external library like jQuery?
Did I miss a well known source of documentation on this matter?
Thanks for your thoughts,
Alex
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en