[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

[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'

[web2py] Re: broken images

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

[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 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... base href={{(URL(request.application,'static','plugin_layouts/ layouts/Optimism/')}} / -D On Feb 15, 1:28 pm,

[web2py] Re: broken images

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

[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

[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

[web2py] Re: broken images

2011-02-15 Thread Massimo Di Pierro
Not sure if that should be base href={{=URL(request.application,'static','plugin_layouts/ layouts/Optimism/')}} / or it should be removed completely. Please try it. On Feb 15, 10:57 am, stargate kyoukh...@gmail.com wrote: The broken images started when i created a new application and applied

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 base href={{=URL(request.application,'static','plugin_layouts/ layouts/Optimism/')}} / or it should be removed completely. Please try it. base is supposed to be an absolute URL; I'm not sure if the output

[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

[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

[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-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 massimo.dipie...@gmail.com

[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 massimo.dipie...@gmail.com 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 kyoukh...@gmail.com wrote: I just created a new site with the

[web2py] Re: broken images

2011-02-14 Thread howesc
try replacing: img src=images/img17.jpg alt= width=90 height=90 / with: img src={{=URL(r=request, c='static', f='plugin_layouts/layouts/ Optimism/images/img17.jpg')}} alt= width=90 height=90 / what that does is use the web2py URL method to build a routes-aware URL and will make a proper URL

[web2py] Re: broken images

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

[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. ../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-

[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.

[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 kyoukh...@gmail.com 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

[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 img src=images/img17.jpg alt= width=90 height=90 / Now this