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 <[email protected]>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 ?
>
> --
> 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 developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<symfony-devs%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/symfony-devs?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 developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to