Tom,

but if 2 plugins require some changes to the theme, they cannot be
used together, isn't it ?

On Jan 20, 1:29 pm, Tom Boutell <[email protected]> wrote:
> This is why my plugin doesn't supply a subclass. Instead, it provides
> helper methods that you call from your own subclass in your
> application in a simple fashion which is described in the
> documentation.
>
> If other plugin authors take the same approach, then their plugins can
> play nicely with mine.
>
> If the admin generator had a lot of event-handling code pretty much
> everywhere anyone might want to extend it, then it might be possible
> to do this slightly more elegantly, but not all that much.
>
>
>
> On Tue, Jan 20, 2009 at 11:08 AM, jukea <[email protected]> wrote:
>
> > Well, let me clarify what I meant. This is based from my understanding
> > of the generators.
>
> > The admin generator has two components you can override to add
> > functionnality. First, there's the generator class, and, there's the
> > associated theme, which is in fact a set of code fragments templates
> > that put all together make the admin.
>
> > For example, I was able to implement sorting on foreign columns (like
> > Tom boutell's first plugin) by overriding the getColumnGetter method.
> > So my plugin simply specify a class that inherits from the standard
> > admin generator, and overrides one or two methods.
>
> > The problem arise when you need to override the code templates. Your
> > plugin cannot override a single piece, you need to fork the whole
> > thing. So two plugins that change the templates cannot be used
> > together. I hope I'm wrong, but I think not.
>
> > I think it would be possible without too much work for the symfony
> > team to add the possibilty to override a theme just for a single code
> > template. So you could base your own theme on an existing one, and
> > change , say, the _form.php template.
>
> > My code isn't available yet, but I'll try to package it real soon.
>
> > It's sf1.2 / doctrine based
>
> > Julien
>
> > On Jan 19, 3:19 pm, weett <[email protected]> wrote:
> >> Hello Julien,
>
> >> Thanks for your quick reply. If you are right (probably someone can
> >> tell?) then it's a pity the generator is not open to more than one
> >> plugin. Creating one plugin which holds all extensions is a solution,
> >> but probably very hard to maintain. If one plugin is the way to go,
> >> then count me in for the 'big merge'.
>
> >> I don't know if anyone has thought about a solution for opening up the
> >> admin generator for (multiple) plugins? An alternative could be to add
> >> a post-filter to each template?
>
> >> Is your project extending the 1.2 admin generator? If so, is the code
> >> available somewhere? Then I can look up the basics for extending, it
> >> will save a lot of 'stupid' questions.
>
> >> Thanks Sjoerd
>
> --
> Tom Boutell
>
> www.punkave.comwww.boutell.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