Hello,
I'm trying to automate the procedure to insert links in HTML files, so they will be relative to site root (in my case d:\localsite).
For example, in a file stored in
I would like to insert a link for a file
So, in file1.html the HTML code should be:
What I have done so far:
I'm trying to automate the procedure to insert links in HTML files, so they will be relative to site root (in my case d:\localsite).
For example, in a file stored in
Code: Select all
d:\localsite\folder1\subfolder1\subfoldera\file1.htmlCode: Select all
d:\localsite\folder2\subfolder2\file2.htmlCode: Select all
<a href="/folder2/subfolder2/file2.html">link text</a>- Firstly, I've added a tag in tag list with begin tag: <a href=""> / end tag: </a>.
- Then I highlight some text in file1.html and insert the above link.
- In File explorer right click the file2.html > Insert into file > Full path, to get a link like
Code: Select all
<a href="d:\localsite\folder2\subfolder2\file2.html">link text</a> - Manually delete the first part of the path (d:\localsite) and then replace backslashes with slashes to end up with the link I want:
Code: Select all
<a href="/folder2/subfolder2/file2.html">link text</a>


