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
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'
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
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.
'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,
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
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
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
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
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
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
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
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
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
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
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
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):
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-
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.
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
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
21 matches
Mail list logo