# Elusive Paths



## Nando (Dec 28, 2010)

I am working on a custom Web Engine so we eliminate a single purpose app and move the last part of our studio's workflow (online proofing) to Lightroom. I have plenty of webdesign experience and after the initial learning curve I am almost finished.

I *AM* having one problem that is driving me absolutely crazy, it might be fairly obvious to someone with more programming experience.

I cannot figure out how to get our logo's path in the header to properly update for pages that are one folder deeper than root. On the grid pages the logo is there with no problem, but on the detail pages (inside the "content" directory) it is obviously a broken image.

Some quick and dirty fixes I already through of are:
1- to do away with the header file and just put the header directly inside the grid and detail pages and enter the proper relative url for the image
2- not to put the detail pages under content/

I am not crazy about either option. . . they seem messier in the long run. Also, the path to this image shouldn't be absolute because we will use these galleries on the web and also exporting locally to burn on to the disks that the client receives.

Anyone have any thoughts? I just know this has to be relatively basic and I'm just missing it. TIA!


----------



## clee01l (Dec 28, 2010)

The Logo header file is probably coded as a relative path.  Of course this fails on pages that are not in the same folder as the home page.  The solution is to code the path as a fixed path from the server (not the website) root directory.  Depending upon your website engine, and server OS, this can vary. It can also vary if you are viewing the webpage locally or remotely. In either case this will probably require some 'under the hood' HTML work 

Do you have a link to the current problem website that is available for someone like me to browse? 

I also notice that this is your first post, welocme to the forum .


----------



## Nando (Dec 28, 2010)

Thanks for getting back to me. You can see a quick test of what I am working with at the following link:

[http://beautifulgray.com/photos/benson_test/]

You are right that the logo is linked as a relative path. The image needs to be linked as a relative path because this web engine will be used to create galleries that will be posted on the web and also that will be saved locally and burned to disks.


----------



## johnbeardy (Dec 28, 2010)

Look at the default HTML gallery for an example. You'll notice that in grid.html and detail.html there's a variable for the root folder. This is a relative path and is passed to the header include file.


----------



## Nando (Dec 29, 2010)

Wow, it was staring me right in the face and I could not see it: "$theRoot"

Many, many thanks, John!


----------



## jjlad (Jan 17, 2011)

Wow ..this was so far over my head that I got a stiff neck just reading it. Great to see such knowledgeable Gurus stepping in to help people out like that. Awesome!
jj


----------

