cancel
Showing results for 
Search instead for 
Did you mean: 

Navigation driven multi page website

x47c
Grafter
Posts: 878
Thanks: 1
Registered: ‎14-08-2009

Navigation driven multi page website

Bear with me on this one, I can answer broadband phone line problems in the other sub-forums but on Web Pages I’m the village idiot.
I run a small village/hamlet website.  Standard amateur type of site; home page with links on front page to all the subsidiary pages stored in separate files.  Hand coded using Komodo Edit as I don’t like the bloatcode from the WYSIWYG editors (I used to write engineering programs in Fortran)
I think as a project I’ll convert these web pages to a more professional type site with a navigation/menu down left hand side, header & footer to page, content in the middle etc…….  So I clean out the local city library of books on HTML5 & CSS to learn how to do it properly to current practice.
But while doing all this reading I find there is a bit no one mentions.  They all tell me how to create various fancy front pages, but no one talks about what happens when you click one of your menu links.  The answer is your home page complete with menu/navigation is swept away and is replaced by one of your sub pages.
I look round on the web for some examples and I find when looking at the source code to my amazement that the only way to maintain the navigation in place is to duplicate the entire menu/navigation/header etc coding in every single subpage.  So it looks to the user as if just the content section pane is changing when actually the whole page is just being duplicated with a revised content part.
So if you want to change the nav/menu to add an extra item – you have to change every single sub page as well as your front page.  This is nuts I think.  I in my naivety thought that there would be a system to hold the ‘fixed parts’ of the page in situ and merely load in the variable content part in response to a navigation item being clicked.
Then I think, surely the true commercial/professional sites cannot be done like this.  They will be adding/removing navigation items on a regular basis and they simply cannot be changing every single of their umpteen sub pages every time.  Then I think maybe they don’t have static HTML/CSS files at all and maybe the content is dynamically generated from a database each time a user requests a page.
So have I fundamentally misunderstood something here in the concept, or is it indeed the case that I have to copy the navigation/menu code etc to each sub page.
6 REPLIES 6
Peter_Vaughan
Community Veteran
Posts: 14,469
Registered: ‎30-07-2007

Re: Navigation driven multi page website

First, there are many ways to do what you have asked...
- The most common commercial way is to use templates for pages where most of the header/footer and navigation is in a separate template file. To make a change to the navigation menu or common header/footer you change the template once then apply the template to all your pages. commercial HTML editors like Dreamweaver have specific functionality to create and maintain templates
- Another way is again to have separate static files for header, footer and menu and include them on each page. This is easy to do using .php files but still possible on static html files using server side includes (.shtml)
- Another way is to use frames where the header, footer & navigation are set-up as frames and you have your main content as another frame. While this will achieve what you want, it is not something that tends to be used today as it is not very search engine friendly.
- Another way is to use a CMS (Content Management System). This stores your pages in a database. This then allows you to define the general page layout like a template and then define areas within the page where you can add your content. This controls all aspects of menu navigation between pages and keeps an overall look & feel to your site. Wordpress is probably the most used in this area but there are many other CMS packages around - e.g. joomla, Drupal. One major benefit in this area are pre-defined templates, of which there are 1000s for Wordpress and the others freely available. These are created by others and can be applied to your content very easily to change the whole look of your site.
I would recommend you look at the last one as it is very easy to produce a simple website with it and gives you the benefits of lots of templates and plugins - a plugin adds special functions to your CMS to do fancy things in javascript / CSS / PHP. The only issue is It does require webspace which supports PHP & MySQL database. If you have an oldish plusnet account you have that already on the cgi server (although the latest version of Wordpress cannot be run due to the plusnet webservers not having a late enough php/mysql version). You can get very cheap webspace from many of the hosting companies like www.daily.co.uk & 1and1.co.uk for which you will need a domain name.
x47c
Grafter
Posts: 878
Thanks: 1
Registered: ‎14-08-2009

Re: Navigation driven multi page website


Thank you indeed for taking the time to reply in detail - I'm starting to understand it now.
I've a lot to learn and consider!
spraxyt
Superuser
Superuser
Posts: 10,063
Thanks: 1,369
Fixes: 75
Registered: ‎06-04-2007

Re: Navigation driven multi page website

How frequently do you expect website content to change?
David
x47c
Grafter
Posts: 878
Thanks: 1
Registered: ‎14-08-2009

Re: Navigation driven multi page website

Once (or should that be if) I’ve converted it to a menu driven site and expanded it I’d expect it would be something like once every quarter.  But I’d guess that would be changes to existing content rather than new content, diary of events sort of thing.
More urgent village stuff like neighbourhood watch/suspicious things seen by village residents is currently circulated by email immediately and would not be suitable for a website.
Then there is the entire aspect of privacy/security/password access to be considered as well.  Advertising a local event on what is a public website (the main which would in effect be advance notice of many homes being unoccupied on a particular evening might be unwise.  Currently I just have a dummy/redirector index.html page with the real site entry page being given another name.
I had vague idle thoughts of producing some sort of compendium local site which could encompass village aspects (yup that includes broadband) together with a local preservation group and a couple of private road funds which operate in the village, all of which are in practice interlinked to some extent.  But that might be well into the realm of the professional as it would need some sort of access restriction to only make available certain pages to certain residents groups (members of the fields preservation group for instance).
As usual I’ve probably bitten off more than I can chew
VileReynard
Hero
Posts: 12,536
Thanks: 615
Fixes: 19
Registered: ‎01-09-2007

Re: Navigation driven multi page website

Have you seen "Village of the damned"?

"In The Beginning Was The Word, And The Word Was Aardvark."

Cign
Grafter
Posts: 42
Registered: ‎17-08-2007

Re: Navigation driven multi page website

If as you say your new website is relatively static you can make use of SSI (Server Side Includes) most web hosts, including PlusNet allow this. You can write each page and when you get to the space where your menu is required you add the line something like    <!--#include virtual="menu.html" -->  this pulls in the code for your menu. You write one page which contains the menu HTML which is then added to every page. You can also use a similar line to add a footer to the page. Then any future changes or additions to the site you just alter the "menu.html" file and it is automatically updated to every page on your site.
As an example I offer my own site hosted with PlusNet,  http://www.cign.org/    it is basically a set of static pages with a menu as described above. If you want the CSS code for some good menus have a look at http://www.cssplay.co.uk/  there are some excellent domos there.
Oh just in case you do look at my site the BLOG page is a Wordpress add-on that links to the main site but still uses the same menu.
Good Luck
John