Wouldn't it also better to use

<base
href="{{response.files.append(URL(request.application,'static','plugin_layouts/
layouts/Optimism/'))}} " />

This would cut time for inserting the code in every image tag on the
page.  Please correct me if i am wrong.



On Feb 15, 1:04 am, villas <[email protected]> wrote:
> > Why would you have another folder called layouts.
>
> I only copied what was in the other post to demonstrate a different
> (more recent) syntax.
>
> If you look in the views/layout.html file you will see how the
> other .js files are included,
> e.g. {{response.files.append(URL('static','js/superfish.js'))}}
>
> It is best if you examine your own paths,  then you will see where
> your files are located and be able to learn to link to them
> accordingly.  Do you have this file? :  static/plugin_layout/Optimism/
> js/cufon-yui.js
> If so, then what you have should be OK.
>
> I think this would be more recommended:
> {{response.files.append(URL('static','plugin_layout/Optimism/js/cufon-
> yui.js'))}}
>
> If you have Firefox browser,  experiment with the Firebug plug-in.
> You can see exactly what is being found and included in your pages. It
> is a good, worthwhile tool.
>
> -D
>
> On Feb 15, 3:21 am, stargate <[email protected]> wrote:
>
> > I am trying to figure out a proper structure.  Right now i have it
> > like this.
>
> > ../<appname>/static/plugin_layouts/Optimism/images/img17.jpg
>
> > Why would you have another folder called layouts.
>
> > Also i am including my scripts like this
>
> >  <script src="{{=URL('static','plugin_layout/Optimism/js/cufon-
> > yui.js')}}"></script>
>
> > Is that correct
>
> > On Feb 14, 8:38 pm, villas <[email protected]> wrote:
>
> > > > <img src="{{=URL(r=request, c='static', f='plugin_layouts/layouts/
> > > > Optimism/images/img17.jpg')}}" alt="" width="90" height="90" />
>
> > > You could also try this format (available in more recent versions of
> > > web2py):
>
> > > {{=IMG(_src=URL('static','plugin_layouts',args=('layouts','optimism','images','img17.jpg')),_alt='pic',_width='90',_height='90')}}
>
>

Reply via email to