Re: [symfony-users] Re: link to images in css file with assetic
Including a stylesheet from a bundle that references an image that is also in the bundle is not supported at this time. The image in the bundle will not be moved to the web directory and will therefore not be available to the stylesheet there. I recommend you move your stylesheets and images into your bundle’s Resources/public/ directory, use the assets:install command to copy them to your web directory, and include the copied stylesheet in your Assetic tag. I realize this is not the ideal solution and am brainstorming better ways. Thanks, Kris On Sunday, June 12, 2011 at 9:22 AM, John Blobsmith wrote: Thanks to reply. I do it : {% stylesheets '@BundleCreator/Resources/Public/css/bundleCreator.css' filter='cssrewrite' %} link rel=stylesheet href={{ asset_url }} type=text/css media=all / {% endstylesheets %} but it not works. The url genrate is /Resources/Public/images/ok.gif but my image is in @BundleCreator/Resources/Public/images/ok.gif. You know where is the problem ? On 11 juin, 19:32, Kris Wallsmith kris.wallsm...@symfony-project.com (http://symfony-project.com) wrote: You need to add the cssrewrite filter to your tag: {% stylesheets '@BundleCreator/Resources/Public/css/bundleCreator.css' filter='cssrewrite' %} On Jun 11, 2011, at 9:57 AM, John Blobsmith oliv.g...@gmail.com (http://gmail.com) wrote: Hi, I use assetic with twig to insert a css file like this : {% stylesheets '@BundleCreator/Resources/Public/css/bundleCreator.css' %} link rel=stylesheet href={{ asset_url }} type=text/css media=all / {% endstylesheets %} It works well but I want insert an image in my css file like this : .image{ background:url('../images/ok.gif') no-repeat; width:16px; height:16px; border:1px solid red; } I think the path of image is not good but which path should I put in my css file ? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com (http://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 (mailto:symfony-users@googlegroups.com) To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com (mailto:symfony-users+unsubscr...@googlegroups.com) For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com (http://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 (mailto:symfony-users@googlegroups.com) To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com (mailto:symfony-users+unsubscr...@googlegroups.com) For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- 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
[symfony-users] Re: link to images in css file with assetic
Thanks to reply. I do it : {% stylesheets '@BundleCreator/Resources/Public/css/bundleCreator.css' filter='cssrewrite' %} link rel=stylesheet href={{ asset_url }} type=text/css media=all / {% endstylesheets %} but it not works. The url genrate is /Resources/Public/images/ok.gif but my image is in @BundleCreator/Resources/Public/images/ok.gif. You know where is the problem ? On 11 juin, 19:32, Kris Wallsmith kris.wallsm...@symfony-project.com wrote: You need to add the cssrewrite filter to your tag: {% stylesheets '@BundleCreator/Resources/Public/css/bundleCreator.css' filter='cssrewrite' %} On Jun 11, 2011, at 9:57 AM, John Blobsmith oliv.g...@gmail.com wrote: Hi, I use assetic with twig to insert a css file like this : {% stylesheets '@BundleCreator/Resources/Public/css/bundleCreator.css' %} link rel=stylesheet href={{ asset_url }} type=text/css media=all / {% endstylesheets %} It works well but I want insert an image in my css file like this : .image{ background:url('../images/ok.gif') no-repeat; width:16px; height:16px; border:1px solid red; } I think the path of image is not good but which path should I put in my css file ? -- 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 -- 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
[symfony-users] Re: link to images in css file with assetic
I tried filter='cssrewrite', but still could not get the right path to the images file in CSSand finally, i give up assetic when css file include images path.. On Jun 12, 5:32 am, Kris Wallsmith kris.wallsm...@symfony- project.com wrote: You need to add the cssrewrite filter to your tag: {% stylesheets '@BundleCreator/Resources/Public/css/bundleCreator.css' filter='cssrewrite' %} On Jun 11, 2011, at 9:57 AM, John Blobsmith oliv.g...@gmail.com wrote: Hi, I use assetic with twig to insert a css file like this : {% stylesheets '@BundleCreator/Resources/Public/css/bundleCreator.css' %} link rel=stylesheet href={{ asset_url }} type=text/css media=all / {% endstylesheets %} It works well but I want insert an image in my css file like this : .image{ background:url('../images/ok.gif') no-repeat; width:16px; height:16px; border:1px solid red; } I think the path of image is not good but which path should I put in my css file ? -- 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 -- 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