Navigation -- I'm making this too hard

My issue is how to use the same link paths for my navigation menu in my index.htm that I do for the pages that occupy subordinate directories.

As I see it, the index.htm must be in the root directory whereas I want my other htm pages in their own subdirectory.

The hangup I see in doing so is that each navigation link in my index.htm would have to use “directory/page.htm” as the href=, whereas the links from the subdirectory pages will have to be “…/directory/page.htm” right?

Other than redirecting my index.htm to its own subordinate directory or creating a cute php approach, is there a way to create a single navigation excerpt?

Regards,

grNadpa

Indeed there is, by putting a / in front of each href the link paths will remnain correct no matter what page you are on, eg

<ul>
<li>< href="/index.htm"></a></li>
<li>< href="/directory/index.htm"></a></li>
<li>< href="/somethingelse/index.htm"></a></li>
<li>< href="/contact/index.htm"></a></li>
</ul>

Or a better way of doing it is to use a directory path approach, if you change index.htm to index.php it will still work…

<ul>
<li>< href="/"></a></li>
<li>< href="/directory"></a></li>
<li>< href="/somethingelse"></a></li>
<li>< href="/contact"></a></li>
</ul>

Terrific.

Just want to confirm that what makes the “better way” work is that all my markup files are named index.htm (or. php) within their directory.

It means that if at some point you change /directory/index.htm to /directory/index.php you won’t have to update the navigation HTML…