I have faced a similar problem recently, and the only approach I found, was to write a custom view class extending sfPHPView and overwriting the getDirectory() and getDecoratorDirectory() methods with my custom logic.
This way, it's easily possible to determine the template path dynamically without hard-coding it into any configuration files and still having the fallback of using the default template. Kind regards Johannes On Mar 18, 10:44 pm, Thomas Rabaix <thomas.rab...@gmail.com> wrote: > The dimension must be set before symfony start, at the configuration level. > To be clear you do not have access to : sfContext::getInstance() > (sfSessionStorage, sfDatabase ...) > > Now, the plugin should work with sf1.4 as ysfDimension just change the > configuration path ... > > For your specific need it will be better to create a custom > sfViewConfigHandler to deal with js/css declarations and tweak templates > paths after symfony bootstrating (register to the load factories event) ... > > On Thu, Mar 18, 2010 at 6:00 PM, Aurélien Fredouelle < > > > > aurelien.fredoue...@gmail.com> wrote: > > I want my project to have multiple themes : the user will be able to > > choose what the website look like. Think of the themes of the phpbb > > forum. > > > In my case, this means changing not only the css, but also some > > templates. What I need is the following : depending on some user > > variables, the templates will be looked up for in apps/modules/ > > mymodule/templates/themeName/ (and, if not found in this directory, > > the default template located in apps/modules/mymodule/templates/ will > > be used). This is exactly what the ysfDimensionsPlugin did, however > > there it does not exist for sf 1.4. > > > I wonder what is the standard way to achieve this (particularly, I do > > not want to mess with the cache). > > > On 18 mar, 17:02, Thomas Rabaix <thomas.rab...@gmail.com> wrote: > > > What you mean by "theme-ing" ? > > > > On Wed, Mar 17, 2010 at 9:36 AM, Aurélien Fredouelle < > > > > aurelien.fredoue...@gmail.com> wrote: > > > > Hi, > > > > > I have been looking for some days how to do "theme-ing" in Symfony, > > > > and in many threads people advised to use the ysfDimensionsPlugin. > > > > > However, the last version of this plugin is for symfony 1.1, with no > > > > further updates. Any ideas why ? Is there a new standard way to do > > > > what this plugin is for ? > > > > > Thanks in advance. > > > > > -- > > > > 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<symfony-users%2bunsubscr...@googlegroups.com> > > <symfony-users%2bunsubscr...@googlegroups.com<symfony-users%252bunsubscr...@googlegroups.com> > > > > > For more options, visit this group at > > > >http://groups.google.com/group/symfony-users?hl=en > > > > -- > > > Thomas Rabaixhttp://rabaix.net > > > -- > > 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<symfony-users%2bunsubscr...@googlegroups.com> > > For more options, visit this group at > >http://groups.google.com/group/symfony-users?hl=en > > -- > Thomas Rabaixhttp://rabaix.net -- 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 To unsubscribe from this group, send email to symfony-users+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.