Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Symfony2: RFC overwrite specific Resources files of a Bundle
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  25 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post will appear after it is approved by moderators
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
gordonslondon  
View profile  
 More options Jan 5 2011, 7:23 pm
From: gordonslondon <jules.boussek...@gmail.com>
Date: Wed, 5 Jan 2011 16:23:08 -0800 (PST)
Local: Wed, Jan 5 2011 7:23 pm
Subject: Symfony2: RFC overwrite specific Resources files of a Bundle

Sometimes ago i have seen a tweet:

*To overwrite a template provided by another Bundle with #Symfony2 just
create a Resources/views/TheOtherBundle/mytpl.twig in your Bundle.*

I haven't tested it, but haven't found any documentation on it.

*Symfony2 should allow us to overwrite any file in the Resources folder of a
Bundle* (views, public, doc, config ..). This will allow us to create some
"abstract" bundles wich can be overwritten easily.

For example i often create new projects so i allways start with the same
bundle and start modifing files in the Resources folder (views, config etc
..). What i want to be able to do is:
- to have for each of my projects a *CommonBundle* with lots of files in
Resources folder.
- a bundle in the Application folder who *overwrites* *files* (under
Resources folder)* of my CommonBundle*.

Is it enough clear ?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ryan weaver  
View profile  
 More options Jan 5 2011, 8:32 pm
From: ryan weaver <weaverr...@gmail.com>
Date: Wed, 5 Jan 2011 19:32:53 -0600
Local: Wed, Jan 5 2011 8:32 pm
Subject: Re: [symfony-devs] Symfony2: RFC overwrite specific Resources files of a Bundle

Hey-

So, this will work, but not exactly how you're asking. The Resources files
is just a convenient way of grouping files that come from a variety of
*very* different systems - templates, configuration, css/js assets,
translations, etc. Documentation on overriding in general (especially
overriding by placing things in your `app` dir) is forthcoming.

So, I'm not sure if it's totally feasible. But I defer to others.

In a related note, I started to write how all of this could be done, but
quickly found myself in a pickle. Namely, I think a lot of making one bundle
override portions of another comes down to the order in which they're
initialized in AppKernel. But thinking now, I feel like you'd need to put
bundle A before bundle B (they'd need the same actual bundle names to
override templates) to override its templates, but you'd need bundle A
*after* bundle B to override its configuration and translations. I *could*
be wrong here - quick somebody try it!

Thanks

Ryan Weaver
Lead Programmer - iostudio - Nashville, TN
http://www.iostudio.com
http://www.thatsquality.com
Twitter: @weaverryan

On Wed, Jan 5, 2011 at 6:23 PM, gordonslondon <jules.boussek...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christophe COEVOET  
View profile  
 More options Jan 6 2011, 3:09 am
From: Christophe COEVOET <s...@notk.org>
Date: Thu, 06 Jan 2011 09:09:21 +0100
Local: Thurs, Jan 6 2011 3:09 am
Subject: Re: [symfony-devs] Symfony2: RFC overwrite specific Resources files of a Bundle
Le 06/01/2011 02:32, ryan weaver a crit :

You don't need to declare the bundle in AppKernel to override templates.
For rendering a template for Hellobundle the templating component will
look at a HelloBundle directory under app/views and then under each of
the bundle dirs (so Application first then Bundle and finally
vendor/symfony/src/Symfony/Bundle if you use the sandbox configuration)

--
Christophe | Stof


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lukas Kahwe Smith  
View profile  
 More options Jan 6 2011, 5:12 am
From: Lukas Kahwe Smith <m...@pooteeweet.org>
Date: Thu, 6 Jan 2011 11:12:22 +0100
Local: Thurs, Jan 6 2011 5:12 am
Subject: Re: [symfony-devs] Symfony2: RFC overwrite specific Resources files of a Bundle

On 06.01.2011, at 01:23, gordonslondon wrote:

> Sometimes ago i have seen a tweet:
> To overwrite a template provided by another Bundle with #Symfony2 just create a Resources/views/TheOtherBundle/mytpl.twig in your Bundle.
> I haven't tested it, but haven't found any documentation on it.

> Symfony2 should allow us to overwrite any file in the Resources folder of a Bundle (views, public, doc, config ..). This will allow us to create some "abstract" bundles wich can be overwritten easily.

> For example i often create new projects so i allways start with the same bundle and start modifing files in the Resources folder (views, config etc ..). What i want to be able to do is:
> - to have for each of my projects a CommonBundle with lots of files in Resources folder.
> - a bundle in the Application folder who overwrites files (under Resources folder) of my CommonBundle.

> Is it enough clear ?

So views are already covered.
And config stuff should be handled by the Bundles Extension class.
Public is a question of what you use in your templates (and for other stuff it should be configurable) and those can be overridden.
Doc's aren't interpreted so there is no need to override them

So I am not sure what is really needed more?

regards,
Lukas Kahwe Smith
m...@pooteeweet.org


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christophe COEVOET  
View profile  
 More options Jan 6 2011, 5:15 am
From: Christophe COEVOET <s...@notk.org>
Date: Thu, 06 Jan 2011 11:15:04 +0100
Local: Thurs, Jan 6 2011 5:15 am
Subject: Re: [symfony-devs] Symfony2: RFC overwrite specific Resources files of a Bundle
Le 06/01/2011 11:12, Lukas Kahwe Smith a crit :

meta for the License file :)
but this is the same as docs. There is nothing more in the best practices.

--
Christophe | Stof


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lukas Kahwe Smith  
View profile  
 More options Jan 6 2011, 6:35 am
From: Lukas Kahwe Smith <m...@pooteeweet.org>
Date: Thu, 6 Jan 2011 12:35:23 +0100
Local: Thurs, Jan 6 2011 6:35 am
Subject: Re: [symfony-devs] Symfony2: RFC overwrite specific Resources files of a Bundle

On 06.01.2011, at 12:15, gordonslondon wrote:

> Good to see that some solutions already exist.

> What I'm searching now, is to overwrite a file under public folder.

> For example i have a template which use a logo image under public folder. I want to overwrite the logo to use my own, i have two solutions:
> - overwrite the view with my new logo (long and not  reusable)
> - overwrite the logo image under the public folder

> The second solution is better than the first one.

I guess we could consider adding some logic to the install asset CLI command to handle this.

regards,
Lukas Kahwe Smith
m...@pooteeweet.org


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christophe COEVOET  
View profile  
 More options Jan 6 2011, 6:42 am
From: Christophe COEVOET <s...@notk.org>
Date: Thu, 06 Jan 2011 12:42:58 +0100
Local: Thurs, Jan 6 2011 6:42 am
Subject: Re: [symfony-devs] Symfony2: RFC overwrite specific Resources files of a Bundle
Le 06/01/2011 12:35, Lukas Kahwe Smith a crit :

This can be easily achieved when making a copy of the assets but I don't
see how it could work when using the --symlink option.

--
Christophe | Stof


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lukas Kahwe Smith  
View profile  
 More options Jan 6 2011, 6:48 am
From: Lukas Kahwe Smith <m...@pooteeweet.org>
Date: Thu, 6 Jan 2011 12:48:11 +0100
Local: Thurs, Jan 6 2011 6:48 am
Subject: Re: [symfony-devs] Symfony2: RFC overwrite specific Resources files of a Bundle

On 06.01.2011, at 12:42, Christophe COEVOET wrote:

Maybe instead of symlink we should use mod_rewrite handling magic?

regards,
Lukas Kahwe Smith
m...@pooteeweet.org


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jordi Boggiano  
View profile  
 More options Jan 6 2011, 8:28 am
From: Jordi Boggiano <j.boggi...@seld.be>
Date: Thu, 06 Jan 2011 14:28:23 +0100
Local: Thurs, Jan 6 2011 8:28 am
Subject: Re: [symfony-devs] Symfony2: RFC overwrite specific Resources files of a Bundle
On 06.01.2011 12:48, Lukas Kahwe Smith wrote:

>> This can be easily achieved when making a copy of the assets but I don't see how it could work when using the --symlink option.

> Maybe instead of symlink we should use mod_rewrite handling magic?

mod_rewrite isn't possible, you could dynamically define Aliases to
paths, but that's essentially the same as symlink, and defining aliases
to files would fix it but it is just crazy you'd have potentially
hundreds of aliases in your .htaccess.

Cheers

--
Jordi Boggiano
@seldaek :: http://seld.be/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lukas Kahwe Smith  
View profile  
 More options Jan 6 2011, 8:31 am
From: Lukas Kahwe Smith <m...@pooteeweet.org>
Date: Thu, 6 Jan 2011 14:31:19 +0100
Local: Thurs, Jan 6 2011 8:31 am
Subject: Re: [symfony-devs] Symfony2: RFC overwrite specific Resources files of a Bundle

On 06.01.2011, at 14:28, Jordi Boggiano wrote:

> On 06.01.2011 12:48, Lukas Kahwe Smith wrote:
>>> This can be easily achieved when making a copy of the assets but I don't see how it could work when using the --symlink option.

>> Maybe instead of symlink we should use mod_rewrite handling magic?

> mod_rewrite isn't possible, you could dynamically define Aliases to
> paths, but that's essentially the same as symlink, and defining aliases
> to files would fix it but it is just crazy you'd have potentially
> hundreds of aliases in your .htaccess.

How so?
mod_rewrite would first check if the file exists in the Application dir and if not fallback to the Bundle dir.

regards,
Lukas Kahwe Smith
m...@pooteeweet.org


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jordi Boggiano  
View profile  
 More options Jan 6 2011, 8:34 am
From: Jordi Boggiano <j.boggi...@seld.be>
Date: Thu, 06 Jan 2011 14:34:09 +0100
Local: Thurs, Jan 6 2011 8:34 am
Subject: Re: [symfony-devs] Symfony2: RFC overwrite specific Resources files of a Bundle
On 06.01.2011 14:31, Lukas Kahwe Smith wrote:

AFAIK mod_rewrite only rewrites the URL, if the file is not in a
publicly accessible dir, it won't work, and you don't want to have your
entire src/ accessible from the web.

Cheers

--
Jordi Boggiano
@seldaek :: http://seld.be/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lukas Kahwe Smith  
View profile  
 More options Jan 6 2011, 8:39 am
From: Lukas Kahwe Smith <m...@pooteeweet.org>
Date: Thu, 6 Jan 2011 14:39:34 +0100
Local: Thurs, Jan 6 2011 8:39 am
Subject: Re: [symfony-devs] Symfony2: RFC overwrite specific Resources files of a Bundle

On 06.01.2011, at 14:34, Jordi Boggiano wrote:

ok for production you want to copy. so this is really only a dev issue.
so you would symlink both dirs.

all links would have to point to the application version and fallback to the bundle version or something like that.

i am pretty sure it can be done .. but will require some fiddeling and it will potentially feel a bit iffy.

regards,
Lukas Kahwe Smith
m...@pooteeweet.org


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christophe COEVOET  
View profile  
 More options Jan 6 2011, 8:41 am
From: Christophe COEVOET <s...@notk.org>
Date: Thu, 06 Jan 2011 14:41:49 +0100
Local: Thurs, Jan 6 2011 8:41 am
Subject: Re: [symfony-devs] Symfony2: RFC overwrite specific Resources files of a Bundle
Le 06/01/2011 14:39, Lukas Kahwe Smith a crit :

the symlink option makes a symlink to the public folder currently. How
would you do such a fallback ? A symlink cannot be changed on the fly

--
Christophe | Stof


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jordi Boggiano  
View profile  
 More options Jan 6 2011, 8:42 am
From: Jordi Boggiano <j.boggi...@seld.be>
Date: Thu, 06 Jan 2011 14:42:51 +0100
Local: Thurs, Jan 6 2011 8:42 am
Subject: Re: [symfony-devs] Symfony2: RFC overwrite specific Resources files of a Bundle
On 06.01.2011 14:39, Lukas Kahwe Smith wrote:

The less hacky way would be to say that if you use --symlink, if a dir
is present in both Application and Bundle, only Application is
symlinked, therefore you would just have to copy all assets if you want
to edit one.

Cheers

--
Jordi Boggiano
@seldaek :: http://seld.be/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jordi Boggiano  
View profile  
 More options Jan 6 2011, 9:11 am
From: Jordi Boggiano <j.boggi...@seld.be>
Date: Thu, 06 Jan 2011 15:11:41 +0100
Local: Thurs, Jan 6 2011 9:11 am
Subject: Re: [symfony-devs] Symfony2: RFC overwrite specific Resources files of a Bundle
Just an idea from beberlei on irc (though I'm not sure that's what he
meant, but it works anyway I think):

symlinks would be:

from: web/bundles/Application/FooBundle
to:   src/Application/FooBundle/Resources/public

from: web/bundles/Bundle/FooBundle
to:   src/Bundle/FooBundle/Resources/public

Then when you do {{ asset('FooBundle:file.jpg') }} or {{
asset('FooBundle:path/to/file.jpg') }} and that would do:

In debug mode: check in both Application and Bundle whether the asset is
found, and echo the proper path.

In non-debug mode: first run of the assets helper would just scan all
public dirs, resolve all paths and cache them.

Cheers

--
Jordi Boggiano
@seldaek :: http://seld.be/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christophe COEVOET  
View profile  
 More options Jan 6 2011, 12:17 pm
From: Christophe COEVOET <s...@notk.org>
Date: Thu, 06 Jan 2011 18:17:31 +0100
Local: Thurs, Jan 6 2011 12:17 pm
Subject: Re: [symfony-devs] Symfony2: RFC overwrite specific Resources files of a Bundle

Le 06/01/2011 18:08, gordonslondon a �crit :

> If i understand well:

> - The convention to overwrite a *Bundle\FooBundle* will be to create a
> *Application\FooBundle* ?
> - When calling {{ asset('FooBundle:file.jpg') }} it will first check
> if /file.jpg/ exists in *Application\FooBundle*, if not take the one
> from *Bundle\FooBundle* ?

> +1 It's a good solution, that sound great !

+1
This seems good. Thus it is consistent with the way to override templates.

--
Christophe | Stof


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lukas Kahwe Smith  
View profile  
 More options Jan 13 2011, 4:29 pm
From: Lukas Kahwe Smith <m...@pooteeweet.org>
Date: Thu, 13 Jan 2011 22:29:34 +0100
Local: Thurs, Jan 13 2011 4:29 pm
Subject: Re: [symfony-devs] Symfony2: RFC overwrite specific Resources files of a Bundle

On 10.01.2011, at 01:23, gordonslondon wrote:

> ok, i've just checked and we can already overwrite public files (work both, with and without --symlink option).

> If Application\HelloBundle needs to overwrite Bundle\HelloBundle:
>    • views: Application\HelloBundle before Bundle\HelloBundle.
>    • config: Application\HelloBundle before Bundle\HelloBundle.

those i know

>    • public: Application\HelloBundle after Bundle\HelloBundle

err how does that work?

regards,
Lukas Kahwe Smith
m...@pooteeweet.org


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
gordonslondon  
View profile   Translate to Translated (View Original)
 More options Jan 14 2011, 11:51 am
From: gordonslondon <jules.boussek...@gmail.com>
Date: Fri, 14 Jan 2011 08:51:31 -0800 (PST)
Local: Fri, Jan 14 2011 11:51 am
Subject: Re: [symfony-devs] Symfony2: RFC overwrite specific Resources files of a Bundle

If two bundles with the same name are registered (i've tested with one in
Application and the other in Bundle),
when installing assets (php console assets:install) the last bundle
registered will overwrite public files of the first one.

It works both with and without --symlink option.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lukas Kahwe Smith  
View profile  
 More options Jan 14 2011, 12:12 pm
From: Lukas Kahwe Smith <m...@pooteeweet.org>
Date: Fri, 14 Jan 2011 18:12:07 +0100
Local: Fri, Jan 14 2011 12:12 pm
Subject: Re: [symfony-devs] Symfony2: RFC overwrite specific Resources files of a Bundle
On 14.01.2011, at 17:51, gordonslondon <jules.boussek...@gmail.com> wrote:

> If two bundles with the same name are registered (i've tested with one in Application and the other in Bundle),
> when installing assets (php console assets:install) the last bundle registered will overwrite public files of the first one.

> It works both with and without --symlink option.

files or directories?
aka i think the app might replace the entire public dir. aka you would first have to copy the bundles public dir into the app dir and then overwrite the files you actually want to replace.

what jordi last suggested was a solution to be able to skip the copy step.

regards
Lukas


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
gordonslondon  
View profile  
 More options Jan 14 2011, 2:18 pm
From: gordonslondon <jules.boussek...@gmail.com>
Date: Fri, 14 Jan 2011 11:18:22 -0800 (PST)
Local: Fri, Jan 14 2011 2:18 pm
Subject: Re: [symfony-devs] Symfony2: RFC overwrite specific Resources files of a Bundle

I think only files that exists in both bundles should be overwritten, the
others are kept (current behavior).

Maybe i don't understand what you want to say.
Do you mean that the logic should be done when calling assets helper instead
of assets:install command ?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lukas Kahwe Smith  
View profile  
 More options Jan 14 2011, 4:54 pm
From: Lukas Kahwe Smith <m...@pooteeweet.org>
Date: Fri, 14 Jan 2011 22:54:14 +0100
Local: Fri, Jan 14 2011 4:54 pm
Subject: Re: [symfony-devs] Symfony2: RFC overwrite specific Resources files of a Bundle

On 14.01.2011, at 20:18, gordonslondon wrote:

> I think only files that exists in both bundles should be overwritten, the others are kept (current behavior).

> Maybe i don't understand what you want to say.
> Do you mean that the logic should be done when calling assets helper instead of assets:install command ?

vi src/Application/FOS/UserBundle/Resources/public/foo.txt -> set content to 'foo'
touch src/Application/FOS/UserBundle/Resources/public/c.png

vi src/Bundle/FOS/UserBundle/Resources/public/foo.txt -> set content to 'dong dong'
touch src/Bundle/FOS/UserBundle/Resources/public/b.png

php app/main/console_dev assets:install --symlink web

gives me:

web/bundles/user/foo.txt (content 'dong dong foo')
web/bundles/user/b.png

With the approach Jordi described (http://groups.google.com/group/symfony-devs/msg/33490139cabc890f) it would "effectively" (*) be like:

web/bundles/user/foo.txt (content 'foo')
web/bundles/user/b.png
web/bundles/user/c.png

Plus adding any file to either place would immediately be available when using the symlink option.

(*) I am saying effectively because in reality the files would be in different locations and the "magic" would be done via the asset helpers. Though I would limit this to just to just symlink mode. When using copy imho everything should be merged into one dir.

regards,
Lukas Kahwe Smith
m...@pooteeweet.org


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
gordonslondon  
View profile   Translate to Translated (View Original)
 More options Jan 15 2011, 4:35 am
From: gordonslondon <jules.boussek...@gmail.com>
Date: Sat, 15 Jan 2011 01:35:08 -0800 (PST)
Local: Sat, Jan 15 2011 4:35 am
Subject: Re: [symfony-devs] Symfony2: RFC overwrite specific Resources files of a Bundle

Your result: "web/bundles/user/foo.txt (content 'dong dong foo')"
Not the same for me. It gives me:

If the bundle in Application is registered *after* the one in Bundle:
- web/bundles/user/foo.txt (content 'foo')
- web/bundles/user/b.png
- web/bundles/user/c.png

If the bundle in Application is registered *before* the one in Bundle:
- web/bundles/user/foo.txt (content 'dong dong')
- web/bundles/user/b.png
- web/bundles/user/c.png

(have you an idea on why i don't get the same result ?)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lukas Kahwe Smith  
View profile  
 More options Jan 15 2011, 4:37 am
From: Lukas Kahwe Smith <m...@pooteeweet.org>
Date: Sat, 15 Jan 2011 10:37:31 +0100
Local: Sat, Jan 15 2011 4:37 am
Subject: Re: [symfony-devs] Symfony2: RFC overwrite specific Resources files of a Bundle

On 15.01.2011, at 10:35, gordonslondon wrote:

> Your result: "web/bundles/user/foo.txt (content 'dong dong foo')"
> Not the same for me. It gives me:

> If the bundle in Application is registered after the one in Bundle:
> - web/bundles/user/foo.txt (content 'foo')
> - web/bundles/user/b.png
> - web/bundles/user/c.png

> If the bundle in Application is registered before the one in Bundle:
> - web/bundles/user/foo.txt (content 'dong dong')
> - web/bundles/user/b.png
> - web/bundles/user/c.png

> (have you an idea on why i don't get the same result ?)

Did you symlink or copy?
Its technically impossible to have to symlinks overlap.

regards,
Lukas Kahwe Smith
m...@pooteeweet.org


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
gordonslondon  
View profile  
 More options Jan 15 2011, 6:21 am
From: gordonslondon <jules.boussek...@gmail.com>
Date: Sat, 15 Jan 2011 03:21:34 -0800 (PST)
Local: Sat, Jan 15 2011 6:21 am
Subject: Re: [symfony-devs] Symfony2: RFC overwrite specific Resources files of a Bundle

 (i use both with and without symlink option)

Ok you're right i have the same result as you.
Except for the content of web/bundles/user/foo.txt where i have what i've
described above.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dirk Luijk  
View profile  
 More options Jul 17 2012, 5:36 pm
From: Dirk Luijk <d...@luijkwebcreations.nl>
Date: Tue, 17 Jul 2012 14:36:54 -0700 (PDT)
Local: Tues, Jul 17 2012 5:36 pm
Subject: Re: [symfony-devs] Symfony2: RFC overwrite specific Resources files of a Bundle

Excuse me for digging up this old topic, but this was the only discussion I
found regarding overwriting assets.

I want to extend a Bundle (let's say Foo/BarBundle) to overwrite some
images and stylesheets, but it's not possible to use the same name for the
extended bundle, because the names must be different when extending (see
Kernel::initializeBundles, line 473). And when using a different name, the
command 'assets:install' places the image in another folder which is not
referenced by the twig template.

Can someone explain how you did the trick?

Besides that, is it possible to extend the Twig's asset() function to look
in the correct folder of the extended Bundle?

Op zaterdag 15 januari 2011 12:21:34 UTC+1 schreef gordonslondon het
volgende:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »