One option is make response.scripts=['jquery.js','whatever.js',...]
and in the layout

{{for script in response.scripts or []:}}
<script src="{{=URL(r=request,c='static',f=script)}}"></script>
{{pass}}

Massimo

On 21 Apr, 16:52, Tim Michelsen <timmichel...@gmx-topmail.de> wrote:
> Hello,
> is it possible to dynamically change web page headers in view?
>
> I am using openlayers.org, an external javascript library which demands
> to embed
> * a library script reference in the header
> * a custom css in the header
>
> How can this be done dynamically?
>
> So far, I just created new layout.html (layout_mylib.html) based on the
> default. Then I included the js & css in that layout file.
>
> In the pages where I want to use openlayers I extended layout_mylib.html
> instead of layout.html.
>
> Is this a good way or are there better options?
> Especially when think of a later interface in admin where maps with
> openlayers shall be added by a click.
>
> Thanks & regards,
> Timmie
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to