Pardon, gmail did something strange there: If they are delivered as complete themes, no, they can't be used together.
If they are delivered as helper functions that *you* call from *your* templates, then they *can* be used together. You just call both sets of functions from your own admin subclass templates. It requires slightly more effort on the part of the developer and the end user, but the benefit is that you can use more than one. (To avoid the proliferation of possible function name conflicts I actually prefer to deliver this sort of thing as a class with static methods rather than helper functions in the usual Symfony sense.) On Fri, Jan 23, 2009 at 8:56 AM, jukea <[email protected]> wrote: > > 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 > > > -- Tom Boutell www.punkave.com www.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 -~----------~----~----~----~------~----~------~--~---
