The website <https://www.abeille-cyclotourisme.fr/> is made by hand. Not with Wordpress or any PHP-type database.
Upon creation of this website over 15 years ago, we did not bother to add a legal notice. Now we do. We want to add to the footer of each webpage a link to a legal notice. This legal notice could be, for example, written on a webpage located in the root directory (say: the page "legalnotice.html").
I would like to use the existing footers of all webpages, without changing them, at all.
What available resource do I have there ?
The footer of each webpage contains a mail link, written as follows when placed on a page located at root:
<quote>
<!-- Infobas -->
<div class="infobas">
<table summary="Bottom footer" width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td class="bas">
<script type="text/javascript" src="scripts/contactez_nous.txt">
</script><br>
</td>
</tr>
</tbody>
</table>
</div>
<!-- / Infobas -->
<unquote>
In a first level sub-directory, in order to point to the "scripts" root directory, it looks as follows (note the "../" added):
<quote>
<!-- Infobas -->
<div class="infobas">
<table summary="Bottom footer" width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td class="bas">
<script type="text/javascript" src="../scripts/contactez_nous.txt">
</script><br>
</td>
</tr>
</tbody>
</table>
</div>
<!-- / Infobas -->
<unquote>
The script is a text file located in the script folder located at root. It is written as follows (with hidden portions for confidentiality):
<quote>
/* "Contactez nous"
Crée un message comportant l'adresse mail de l'abeille
et un texte dans le champ objet
*/
// Définition d'une variable contenant le début du code HTML
var liencontact="<a href='mailto:";
/* Ajout des différents éléments de l'adresse mail
dans la variable
*/
liencontact +="xxx";
liencontact +="@";
liencontact +="yyy.fr";
liencontact +="?subject=%5BAbeille%5D%20Demande%20d%27information'>";
// Affichage de la variable et du texte "contactez-nous"
document.write(liencontact+"Contactez-nous @</a>");
<unquote>
This script, with its variations for all sub-directory levels in the structure, exists in each and every page of the website. That is the beauty of it. It just works.
I would like to write and upload the page legalnotice.html and modify the script; but do not want to modify all the footers of all website pages (to adjust the link to the legalnotice.html page depending on sub-directory hierarchy) in order to make that to happen.
I know how to place a relative link to the legal notice page, but that solution would force me to modify each and every footer on the website.
I know also how to place an absolute link to the legal notice webpage, that would be better, but would not resist to changes of the website address.
Is there any way to do what I want and (1) not be forced to modify the footers of the entire website and (2) be website-address independent ?
TIA for any suggestions.
See Question&Answers more detail:
os