Document Root Question

User 2601115 Photo


Guest
3 posts

Is there a way to set up an artificial document root inside of Coffeecup?

Specifically the problem is this:

Rather than using SSI, I'm using JQuery load() calls to include documents. This way in theory, allows me to get an accurate preview from inside of Coffeecup.

My problem is this: I include a file which has my navigation bar and has an img tag referring to "/images/mygraphic.jpg". This works fine on the website, but wrong previewing it on my local machine because my root isn't the same as the webservers.

But If I make it relative, say "../images/etc", then it only works from directories on the same tree depth as the images directory which isn't necessarily so on our website. I can't have an html file include this file at any other depth on the tree.

So what I'd like to do is to tell Coffeecup, for preview purposes, what "/" corresponds to on my machine. Can I?

User 2147626 Photo


Ambassador
2,958 posts

Answer is probably but you may have to wait for someone with more knowledge than me to chime in. While you wait, which program are you using? I'm guessing HTML Editor. Or is it Visual Site Designer?
Graphics for the web, email, blogs and more!
-------------------------------------
https://sadduck.com
User 187934 Photo


Senior Advisor
20,271 posts

Try using the temp directory that Coffeecup uses for a local preview
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2601115 Photo


Guest
3 posts

I'm using the HTML Editor.

The problem with the temp directory is that "/" doesn't refer to it. It refers to the top directory of the hard drive.

I've got apache on my machine, and am perfectly willing to use it, but that defeats the WYSIWYG aspects of this product (unless I can tell it to use my localhost url for the preview)
User 187934 Photo


Senior Advisor
20,271 posts

What happens if you use the apache web folder as the project folder?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 146692 Photo


Registered User
59 posts

this problem is happening because when you begin the path with the "/" it will go to the ROOT of your
if your files are stored on the C:\documents and settings\user\my doc\here
and you are using "/path/cod.jpg"
the computer will point to C:\path\cod.jpg
while on the server it will point to the root of your user
User 146692 Photo


Registered User
59 posts

in order to solve it you would have to save all the files on the root of the system (for example: C:\)
User 187934 Photo


Senior Advisor
20,271 posts

I HAVE NO MORE IDEAS.:);)
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2601115 Photo


Guest
3 posts

I have one:

Coffeecup's HTML Editor lets you tell IT what the document root is as far as it should be concerned and it interprets the files using that.

As awesome as this product is, an omission like this seems to be pretty glaring, but that's just me.

Give me a plug in API and I'll fix it :)
User 187934 Photo


Senior Advisor
20,271 posts

You have to remember that these products are built to preform with little problems. I could just imagine the amount of questions that would be asked here if users were allowed to alter the setup. So you do have an option from what I could tell so all is good. C:\ it is.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.