One option is to use a block: 
http://web2py.com/books/default/chapter/29/05/the-views#Blocks-in-views

Another is something like:

{{=globals().get('head_script', '')}}

Then have the controller return a 'head_script' variable, or define the 
variable in the view *before* the {{extend 'layout.html'}} directive 
(anything defined before the extend will be available to the entire 
layout.html template, even before the {{include}} directive where the view 
gets inserted).

Anthony

On Friday, August 2, 2013 7:57:21 AM UTC-4, lucas wrote:
>
> hello one and all,
>
> under a view html file, what is the best way to add a SCRIPT helper to the 
> head of the final output.  using layout.html as the template.
>
> thanx in advance, lucas
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to