I was able to get the template overriding working with your first
suggestion and I understand that Symfony now looks there before the
bundles to find the required templates. However, I still don't feel I
have a good grasp of how to override a bundle.

This is probably a really stupid question but I have created a new
bundle set up the getparent() method and copied a template file from
the original bundle into the new bundles resources. The issue I am
having is how do I tell Symfony it should look there first before
looking at the original bundle? I have read that you can override the
services of bundles by declaring new services with the same name after
the declaration of the original service but I am not sure if this is
the correct route for me to take.

Once again any help is much appreciated.


On May 12, 11:25 pm, Christophe COEVOET <s...@notk.org> wrote:
> Le 12/05/2011 23:45, scott a �crit :> Is there any documentation or 
> information on extending existing
> > bundles? I have installed the easy-extend bundle as part of the media
> > bundle installation but I am not sure I really understand how this
> > works and how to override existing controllers, entities and views?
>
> > Thanks in advance for any help.
>
> Entities are not extendable due to the way Doctrine works.
>
> For views, it is described 
> here:http://symfony.com/doc/2.0/book/templating.html#overriding-bundle-tem...
>
> Overwriting controllers is done by creating a bundle as child of the one
> you want to overwrite (which also works for templates by the way):
>
> class AcmeFrameworkBundle extends Bundle
> {
>      public function getParent()
>      {
>          return 'FrameworkBundle';
>      }}/
>
> /
>
> --
> Christophe | Stof

-- 
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

Reply via email to