Append a callable to turbogears.view.variable_providers that adds the
variables you need. Example:
def add_my_vars(d):
d.update(dict(foo=1, bar=2))
from turbogears.view import variable_providers
variable_providers.append(add_my_vars)
Now you should be able to do ${tg.foor} and ${tg.bar} in your view
templates.
Hope it helps.
Alberto
On Mar 29, 2006, at 3:02 PM, Claudio Martínez wrote:
>
> How can I make a variable available for all the templates without
> returning it from the controller?
>
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" 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/turbogears
-~----------~----~----~----~------~----~------~--~---