Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Struggling to figure out GS
#4
I think the problem might be with the relative path starting with two dots. Think about this example:
  • I create a child page called child to a page called parent.
    Now the address for this page will be: http://example.ms/parent/child.
  • On this page I embed an image with a path that worked in the admin: ../data/uploads/image.png.
  • Now I open the page in my browser.
    The browser will try to get the following image: http://example.ms/parent/data/uploads/image.png.
  • The image does not exist.

A way to fix this would be to start your relative paths with just a forward slash (/), this will set the browser to start at the root. /data/uploads/image.png always points to http://example.ms/data/uploads/image.png.

Relative paths are always tricky. A path that works in the admin section is made to work relative to the admin section only, not to the final page.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply


Messages In This Thread
Struggling to figure out GS - by shumphreys - 2010-06-23, 08:31:47
Struggling to figure out GS - by Zegnåt - 2010-06-23, 21:45:13
Struggling to figure out GS - by shumphreys - 2010-06-23, 22:06:36
Struggling to figure out GS - by Zegnåt - 2010-06-24, 01:14:31



Users browsing this thread: 1 Guest(s)