On Jun 18, 2006, at 4:11 PM, Arnold wrote:

>
> Thank you Alberto,
>
> I choose the last solution you propose an it works. Thanks a lot
> Alberto.  So my problem is solved.
> However, just for full understanding, I submit a few additional
> questions:
> 1/ In the doc,
> http://www.turbogears.org/docs/api/turbogears.view- 
> module.html#stdvars,
> turbogearsjs is supposed to do more less the same. I tested it without
> sucess. For instance, the app server says that turbogearsjs doesn't
> exist. Do you know if it's a doc problem or a missunderstanding  
> from me
> ?

I believe it's an outdated doc problem, "turbogearsjs" is probably  
the former name of "tg_js". FYI, stdvars is the function that calls  
all callables you provide at the variable_providers list to provide  
your own variables to all templates.

> 2/ The std.xxx variable works (except tg_js which gives the /tg_js  
> path
> in the rendered web page) and tg seems to be unkown.
> Otherwise I have to try the first solution you propose
> ${tg.url("static/javascript/my.js")} . Not done yet

Ooops, another typo there:
"${tg.url("static/javascript/my.js")}" should be "${std.url("static/ 
javascript/my.js")}"
"std" was deprecated in favor of "tg", at least from 0.9a6 I believe,  
you must be using an earlier version...
don't you?

BTW, if you try the last solution (the one that uses  
variable_providers) and pass the url though "url" in the variable  
updating function, you won't need to do it again in the template.

Alberto

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to