grnadpa — 2014-01-07T13:25:18-05:00 — #1
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?
bluedreamer — 2014-01-07T14:47:51-05:00 — #2
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
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...
grnadpa — 2014-01-07T15:14:35-05:00 — #3
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.
bluedreamer — 2014-01-07T16:00:04-05:00 — #4
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...