How to have relative path (ex ../../)...

User 2934894 Photo


Registered User
3 posts

Hello,

I use The HTML Editor and search how to obtain a relative path for file links, like we have with the "Insert image window". (I know difference between absolute and relative path)

In the "Insert Link window", when you select another file, you not have "../../" added to the name of file when it's necessary.

If I open a file, and I want to add (image and file are located at the same place)
- an image link => ex : ../../picture.png
- a file link => any_folder/file.html

The path starts on a folder ...

Thank you very much.
User 122279 Photo


Senior Advisor
12,600 posts
Online Now

Just now I did an example. Opened a new html document, inserted an image from my desktop, and I got this:
<img src="file://C:/Users/Inger/Desktop/pm.JPG" width="809" height="273" alt="" title="" />

Then I saved my html file to the desktop, and the link immediately changed to this:
<img src="pm.JPG" width="809" height="273" alt="" title="" />

I added another image from the desktop:
<img src="foca-anglers.jpg" width="1600" height="451" alt="" title="" />


I think SAVING the file is what you need to do.
Ha en riktig god dag!
Inger, Norway
My new honey site, built with RFF: https://eikweb.com/horgenhonning/
Component sharing for RFF, RBB, RSD and SD: https://eikweb.com/sharing/


User 2934894 Photo


Registered User
3 posts

Thank you Inger for your answer,

but my problem is about links created from file, using "Insert Link window" in CoffeeCup HTML Editor.

When I open new document, I create image link : no problem, The "Insert image window" creates good relative path.

Result : <img src="../../../../TESTS/chat icone 3.jpg" width="40" height="39" alt="" title="" />

That's what I want to obtain with file links.

With the "Insert Link window" interface, it produces an absolute path (and even complete path).

Result : <a href="TESTS/My page.html">test Page</a> and I would obtain <a href="../../../../TESTS/My page.html">test Page</a>

Even though I save my document, link does not change.

I don't know if it is possible with CoffeeCup. I thought I was (I am new user of CC :)). I have many files to create with relative path. I can't create them manually.


Thank you very much

User 379556 Photo


Registered User
933 posts

I have found that the Insert menu has an item called 'Quick Link to Relative File'. That properly results in the correct relative path to the file in the Website Project.

The screen-shot shows the sub-directory and additional files I put into some local web pages I use, and the result of using 'Quick Link to Relative File' to insert a link in a file in the test-2 sub-directory to a file at the top level.

https://fc7777.coffeecup.com/rel-path.jpg

Frank
User 2934894 Photo


Registered User
3 posts

Hello Frank,

It's just what I searched. :D

I had looked menus but I did not notice. And after I was expecting stupidly to find it just with simple link file options and right clic. :rolleyes:

To create link from file into four or more sub folder, the screen is covered by sub-menu but it's works and it's fine.

Thank you so much for your solution.

Olivier

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.