Hi, I am testing my site on a local machine. I am having an issue with navigation links being broken on my form template after changing the link paths from direct to relative:
I have two templates, “main-template” and “form-template”. Those templates include the same header file:
<?php include("includes/header.inc.php"); ?>
That file contains the site navigation. Originally, the links were direct paths:
<a href=“/site-name/pagename”>Page with direct path</a>
But I changed them to relative paths:
<a href=“../../pagename”>Page with relative path</a>
So far, so good. Everything works on the site except the navigation on the form page breaks. Clicking on those links wants to take me back to my root htdocs folder. I think it might have something to do with the form not being able to post to a template file, so it posts to itself instead.
I have found a temporary work around, which is create a NEW header include file that only the form template uses. If I give those links shortened relative paths:
<a href="../pagename">
It all works, except I now have two unique navigation menus I have to keep track of, when I would rather have just one header file for the entire site.
Any ideas on how I can keep the same header file with the main-template and form-template? Thanks!