Jeff Hinrichs - DM&T wrote:
> I am trying to follow the BreadCrumb example from the wiki:
> http://trac.turbogears.org/turbogears/wiki/BreadCrumbNaviation
>
> And I can't figure out how to "Now in your kid template, import the
> function and create your navigation bar"
>
> I've places the createNavBarLinks function in my controllers.py and
> then tried accessing the function from within the master.kid template
> and the welcome.kid template. However I can't figure out the proper
> import voodoo inside of the kid template.
>
In your main controller, or any other file you include at startup:
----
from turbogears import view
def addvars(vars):
vars['breadCrumbLinks'] = breadCrumbLinks
view.variable_providers.append(addvars)
----
Then, you may refer to the function as tg.breadCrumbLinks from the
templates.
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---