[Seaside] Making generated links more understandable
mac.hive at me.com
Tue Mar 27 15:10:01 UTC 2012
On Mar 27, 2012, at 11:00 AM, Nick Ager wrote:
> 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.
Yes, I have html image tags as you describe. I have been told not to use the FileLibrary class for things like CSS, etc, because it gets cached somewhere where it shouldn't,
but I am forgetting the exact reason now. So, I don't use the FileLibrary for anything, in deployment, and I'm talking about my deployed system here. This code works correctly in my local system that uses a FileLibrary.
> Have a look with the developer tools (firebug etc) to see what the request path is
> seaside mailing list
> seaside at lists.squeakfoundation.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside