Author Topic: Is there a root path variable?  (Read 7148 times)

0 Members and 1 Guest are viewing this topic.

Offline www.girls-on-bikes.com

  • Full Member
  • ***
  • Posts: 145
    • View Profile
    • http://www.girls-on-bikes.com/
Is there a root path variable?
« on: June 06, 2003, 09:05:42 AM »
Hello All,
Is there a root path variable in the form {...}?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Is there a root path variable?
« Reply #1 on: June 06, 2003, 11:19:37 AM »
I think its only {self} and {self_full} avalable, that points to the current document.
also, root path is normaly is just relative, witch is ./
so it doesnt make sence use it in templates as it is, because it would be as root in ./templates/<yourtemplate>/ dir.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Is there a root path variable?
« Reply #2 on: June 06, 2003, 05:16:25 PM »
Perhaps if you explain why you need a root path variable, we can suggest a solution.

Offline www.girls-on-bikes.com

  • Full Member
  • ***
  • Posts: 145
    • View Profile
    • http://www.girls-on-bikes.com/
Is there a root path variable?
« Reply #3 on: June 06, 2003, 07:48:52 PM »
I actually got things worked out, but for future reference, here is what I wanted to do:

I'm doing the "put the images in the background of the tables" thing, and as far as pointing to the transparent image, I wanted something like:
Quote
<img src="{root_path}/transparent.gif">


But now that I think about it, I think all of the pages that would use jpg.html would be accessable from the root install, so this would probably work:
Quote
<img src="./transparent.gif">

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Is there a root path variable?
« Reply #4 on: June 06, 2003, 09:19:40 PM »
Quote
<img src="./transparent.gif">

as far as I tryed on several servers, u dont even need ./
I might be wrong though.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline www.girls-on-bikes.com

  • Full Member
  • ***
  • Posts: 145
    • View Profile
    • http://www.girls-on-bikes.com/
Is there a root path variable?
« Reply #5 on: June 06, 2003, 09:29:14 PM »
What I wasn't sure about is the fact that this was in jpg.html, which isn't located in the root, so it's not in the same directory as transparent.gif, but as you know, jpg.html is used in details.php, which is in the root, so... :)

Just want to try to reduce or eliminate any hardlinks for when I change locations.  I'll have to do some trial runs later.

Thanks

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Is there a root path variable?
« Reply #6 on: June 07, 2003, 06:32:32 AM »
I think you're better off using this:
Code: [Select]
{template_url}/images/transparent.gif
And place your gif in the template images directory

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Is there a root path variable?
« Reply #7 on: June 07, 2003, 08:19:03 AM »
Quote from: Chris
Code: [Select]
{template_url}/images/transparent.gif

or even shorter ;)
Code: [Select]
{template_image_url}/transparent.gif
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)