If you go here http://www.web2py.com/layouts
then preview Optimism. How come when you go to view source the image path is /images and the image file name. But when you click on view image it will show you the exact path of the images. I am just wondering why can't i just do /images/folder/myfile_name instead of typing the exact location of the template On Feb 15, 2:56 pm, villas <villa...@gmail.com> wrote: > The plugin replaces your layout.html > > Open up views/layout.html > Search for: images/ > Replace with: static/plugin_layouts/layouts/Pluralism/images/ > > Does that help? > > I should mention that the plugin is just to get you a head start. > You're going to have to do more work to assimilate it into your site. > I am not very familiar with it, but someone may be able to help. > > On Feb 15, 4:57 pm, stargate <kyoukh...@gmail.com> wrote: > > > The broken images started when i created a new application and applied > > the following layout plugin to it > > >http://www.web2py.com/layouts/static/plugin_layouts/layouts/Pluralism... > > > The problem is when you see the preview all the images are intact but > > when i try to do it all the images are broken not to sure why > > > On Feb 15, 11:33 am, stargate <kyoukh...@gmail.com> wrote: > > > > This line generates a error > > > > <base href="{{(URL(request.application,'static','plugin_layouts/ > > > layouts/Optimism/')}}" /> > > > > Not sure why > > > > On Feb 15, 9:40 am, villas <villa...@gmail.com> wrote: > > > > > 'base' is for when all links on that page are to the same place. You > > > > have to decide that. > > > > > However, I don't think 'response.files' is right for that. Maybe this > > > > would be better... > > > > <base href="{{(URL(request.application,'static','plugin_layouts/ > > > > layouts/Optimism/')}}" /> > > > > > -D > > > > > On Feb 15, 1:28 pm, stargate <kyoukh...@gmail.com> wrote: > > > > > > 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 <villa...@gmail.com> 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 <kyoukh...@gmail.com> 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 <villa...@gmail.com> 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')}} > >