I have got a "site layout" template set up as per http://webpy.org/cookbook/layout_template . There are some variables that I would like to display through the site layout template so that they're visible on all pages. However, they would not be relevant to the individual page templates so I don't want to pass these variables to each template individually, as that would lead to much repeated code.
An example of such information would be site structure trail, like the one webpy.org uses. It's not of importance to the individual page templates, rather the site layout template. Maybe even the currently logged-in user's name (so that the site layout template could display this, or a "log in" link). It would be very helpful if I could point webpy to a dict of variables that I would like included in the site layout template as well as "content". Such a dict could be updated whenever is appropriate to my app. Inside the site layout template I could say $dict.varname to refer to them. Ideally I would not have to pass this dict to each call of render(), as that's logically aimed at individual pages, not the site layout page. Is this possible? Many thanks for your time and any advice you may be able to give. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web.py" 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/webpy?hl=en -~----------~----~----~----~------~----~------~--~---
