[web2py] Re: broken images

2011-02-16 Thread villas
Yes of course all you are doing is referring to the existing path of the images. BTW I think the URL code I gave may be a bit wrong: Try this instead: {{u=URL('static','plugin_layouts',args=('layouts','Optimism'))}} ..., or, try this, Replace the index function in your 'default.py' controlle

[web2py] Re: broken images

2011-02-16 Thread stargate
It worked when i go to the following URL all the images are working now http://localhost:8000/template/static/plugin_layouts/layouts/Pluralism/index.html But that isn't the right way to view the application. So the only work around is to provide full path for the image is this correct. One metho

[web2py] Re: broken images

2011-02-15 Thread villas
I think I now understand, you want the plugin to work like it does online. After you install a new app e.g. 'alayout' and then the layout plugin 'Optimism', the layout is copied over the top of views/layout.html. This is visible from: http://localhost:8000/alayout/ But the images and urls etc

[web2py] Re: broken images

2011-02-15 Thread stargate
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/myfi

[web2py] Re: broken images

2011-02-15 Thread villas
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.

Re: [web2py] Re: broken images

2011-02-15 Thread Jonathan Lundell
On Feb 15, 2011, at 11:16 AM, Massimo Di Pierro wrote: > > Not sure if that should be > > > > or it should be removed completely. Please try it. is supposed to be an absolute URL; I'm not sure if the output of URL() qualifies, since it doesn't include a scheme and domain. Maybe Also, a

[web2py] Re: broken images

2011-02-15 Thread Massimo Di Pierro
Not sure if that should be or it should be removed completely. Please try it. On Feb 15, 10:57 am, stargate 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/Plura

[web2py] Re: broken images

2011-02-15 Thread villas
Well I never used 'base' before; that was your idea :) Anyhow 'base' should be in the head section, I don't think it would be such a good idea to use it. To make a shortcut in your page how about generating an URL string and then just prepending it to the image tags? For example: Create the stri

[web2py] Re: broken images

2011-02-15 Thread stargate
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/index.html The problem is when you see the preview all the images are intact but when i try to do it all the images are br

[web2py] Re: broken images

2011-02-15 Thread stargate
This line generates a error Not sure why On Feb 15, 9:40 am, villas 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... > > > -D > > On Feb 15, 1:2

[web2py] Re: broken images

2011-02-15 Thread villas
'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... -D On Feb 15, 1:28 pm, stargate wrote: > Wouldn't it also better to use > > href="{{response.files.append(URL(re

[web2py] Re: broken images

2011-02-15 Thread stefaan
Hello, Perhaps I'm stating the obvious here, but make sure to reload the page in your browser after changing things: you might be looking at a cached wrong version of your page instead... Best regards, Stefaan.

[web2py] Re: broken images

2011-02-15 Thread stargate
Wouldn't it also better to use 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 wrote: > > Why would you have another folder called layouts. > > I only copied what was in the other post to demonstrate a di

[web2py] Re: broken images

2011-02-14 Thread villas
> 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'))}

[web2py] Re: broken images

2011-02-14 Thread stargate
I am trying to figure out a proper structure. Right now i have it like this. ..//static/plugin_layouts/Optimism/images/img17.jpg Why would you have another folder called layouts. Also i am including my scripts like this Is that correct On Feb 14, 8:38 pm, villas wrote: > > > > You could

[web2py] Re: broken images

2011-02-14 Thread villas
> 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')}}

[web2py] Re: broken images

2011-02-14 Thread howesc
try replacing: with: what that does is use the web2py URL method to build a routes-aware URL and will make a proper URL for your image. note that i assume that your image is in this directory: ..//static/plugin_layouts/layouts/Optimism/images/img17.jpg good luck! cfh

[web2py] Re: broken images

2011-02-14 Thread stargate
Is there something I am doing wrong? On Feb 13, 9:14 pm, Massimo Di Pierro wrote: > Can you tell the layout name, an example of image url that you get and > what should be? > > On Feb 13, 6:50 pm, stargate wrote: > > > I just created a new site with the wizard and the template Optimism. > > When

[web2py] Re: broken images

2011-02-14 Thread stargate
I even tried creating a new application called template and then i installed the Pluralism layout plugin and applied it to the site but when i view the site all the images are broken. How do I fix this. Thanks for all the help On Feb 13, 9:14 pm, Massimo Di Pierro wrote: > Can you tell the layou

[web2py] Re: broken images

2011-02-13 Thread stargate
When i edit layout.html i can see the following line of code {{response.files.append(URL(request.application,'static','plugin_layouts/ layouts/Optimism/style.css'))}} When i search farther down layout.html i can see the following code Now this image tag should display the image because it exis

[web2py] Re: broken images

2011-02-13 Thread Massimo Di Pierro
Can you tell the layout name, an example of image url that you get and what should be? On Feb 13, 6:50 pm, stargate wrote: > I just created a new site with the wizard and the template Optimism. > When the wizard is completed and the site generated everything works > fine but all the images are br