How would I go about creating a menu (complex, simple, etc – doesn’t matter in this example) and then linking to each in each page of my site?
I wish to create menu and then have index.htm, page2.htm, page3.htm, .. pageN.htm refer to it and load it as if it exists on each page individually.
Basically, I wish to write it once, and use it everywhere.
For example:
Menu:
Home | Page 1 | Page 2 | Page 3 | Page N
And then:
Page1.htm
Home | Page 1 | Page 2 | Page 3 | Page N
Content
More Content
Even More Content
…and…
Page2.htm
Home | Page 1 | Page 2 | Page 3 | Page N
Content
More Content
Even More Content
…and so forth so that when I change the content of the menu, it will reflect automatically across each page that references it, much the same was that CSS works.
Many thanks.
Copy/Paste. 🙂
Seriously, I did HTML/CSS only dev for a year or two and the only reliable way I found was copy/paste the menu. Now, if you go into PHP at all, heck even one line of PHP you can
includean HTML file (here, your menu) which is saved in a separate menu.html file.It’s a lot of work to keep the menus up to date, especially if you have a lot of pages – that’s why so many people switched to a Content Management System (CMS) like Joomla/Wordpress/Drupal, or added PHP, or even Dreamweaver does it (library items).