[Seaside] Making generated links more understandable
Nick Ager
nick.ager at gmail.com
Tue Mar 27 15:00:05 UTC 2012
>
> I am also struggling to understand why everything breaks. My nginx.conf
> file redirects to /var/www/glass for files that I refer to in my code, so I
> only put 'picture.jpg' for an image, for instance, or 'bootstrap.css', and
> it all works great. Would you call that a relative path?
>
> If I put in that single addToPath line in updateUrl:
>
> updateUrl: aUrl
>
> super updateUrl: aUrl.
>
> aUrl addToPath: self class name
>
>
So in your render methods do you have code that looks like:
html image url: 'picture.jpg'.
If so the request url will be relative to page path, which you are
modifying by adding the class name.
I'd normally develop using a file library or external file library which
would look like:
html image url: MyFileLibrary / #pictureJpg.
this generates html as: <img src='/files/MyFileLibrary/picture.jpg'>
which is always absolute from the root.
Have a look with the developer tools (firebug etc) to see what the request
path is
Cheers
Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20120327/57964f17/attachment.htm
More information about the seaside
mailing list