Thanks Eno. Thanks for reminding me to first rummage through the documentation throughly. :) Will keep that in mind.
Vikram On Feb 24, 10:10 pm, Eno <[email protected]> wrote: > On Tue, 24 Feb 2009, SeeVik wrote: > > Hmmm....that is exactly what I wanted to avoid - writing the > > use_helper again and again. > > Again, this is ALL documented in the book: > > "You cannot remove the first four helper groups in the preceding list > (Helper, Tag, Url, and Asset), because they are compulsory for the > templating engine to work properly. Consequently, they don't even appear > in the list of standard helpers." > > "If you ever need to use a helper outside a template, you can still load a > helper group from anywhere by calling > sfProjectConfiguration::getActive()->loadHelpers($helpers), where $helpers > is a helper group name or an array of helper group names. For instance, if > you want to use auto_link_text() in an action, you need to call > sfProjectConfiguration::getActive()->loadHelpers('Text') first." > > http://www.symfony-project.org/book/1_2/07-Inside-the-View-Layer#chap... > > If you know all the templates of a particular module need a helper that > you need to always load, you could create a preExecute() function in your > actions class to load them every time. > > http://www.symfony-project.org/book/1_2/06-Inside-the-Controller-Laye... > > -- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" 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-users?hl=en -~----------~----~----~----~------~----~------~--~---
