best way to provide website wide navigation bar?

1

123Jim

Hi all,
My navigation links are to appear in a column on every page of my website.

At the moment
I have an external css for styling links in a bulleted list, as found all
over the web.

... but I have the same links on every page, which will need to be added to
as more web pages are created or removed.

so .. how can I have one list that appears on every page so that I do not
need to edit every page on my website when a link is added or removed?

I don't want to add an HTML page inside my web pages unless I can get rid of
the ugly scroll bars that appear in the browser.

thanks for any advice

Jim
 
D

Doug Miller

Hi all,
My navigation links are to appear in a column on every page of my website.

At the moment
I have an external css for styling links in a bulleted list, as found all
over the web.

... but I have the same links on every page, which will need to be added to
as more web pages are created or removed.

so .. how can I have one list that appears on every page so that I do not
need to edit every page on my website when a link is added or removed?

I don't want to add an HTML page inside my web pages unless I can get rid of
the ugly scroll bars that appear in the browser.

thanks for any advice

Google "server side includes".
 
S

SAZ

Hi all,
My navigation links are to appear in a column on every page of my website.

At the moment
I have an external css for styling links in a bulleted list, as found all
over the web.

.. but I have the same links on every page, which will need to be added to
as more web pages are created or removed.

so .. how can I have one list that appears on every page so that I do not
need to edit every page on my website when a link is added or removed?

I don't want to add an HTML page inside my web pages unless I can get rid of
the ugly scroll bars that appear in the browser.

thanks for any advice

Jim



Use PHP, ASP, SHTML, or any other Server side include (SSI) that is
supported by your web host.

You can also use Javascript, but that would be the worst choice.

This is relatively easy. Search Google for several descriptions on how
to do this.
 
1

123Jim

SAZ said:
Use PHP, ASP, SHTML, or any other Server side include (SSI) that is
supported by your web host.

You can also use Javascript, but that would be the worst choice.

This is relatively easy. Search Google for several descriptions on how
to do this.

ah .. the trouble is my hosting is free from my ISP (UK Tiscali, Talk talk)
and does not provide any server side stuff.
 
C

C A Upsdell

ah .. the trouble is my hosting is free from my ISP (UK Tiscali, Talk talk)
and does not provide any server side stuff.

Your editor should have global search and replace: use it. (If it
doesn't, get a better editor.)
 
S

SAZ

ah .. the trouble is my hosting is free from my ISP (UK Tiscali, Talk talk)
and does not provide any server side stuff.

Is this a business website? If so, invest in a true web host and spend
$10 or so a month.

If this is a personal site, I'm not sure about the UK, but you can get
hosting as cheap as $4 - $5/month in the US. PHP is included just about
everywhere.
 
1

123Jim

C A Upsdell said:
Your editor should have global search and replace: use it. (If it
doesn't, get a better editor.)


My web dev environment has no such function (Kompozer), but Notepad++ does
the job very well.
Thanks to all those who replied. I am up to speed now.
 
1

123Jim

SAZ said:
Is this a business website? If so, invest in a true web host and spend
$10 or so a month.

If this is a personal site, I'm not sure about the UK, but you can get
hosting as cheap as $4 - $5/month in the US. PHP is included just about
everywhere.

Thanks for the info .
 
J

Jonathan N. Little

123Jim said:
My web dev environment has no such function (Kompozer), but Notepad++ does
the job very well.

Hmmm, when did they remove it? "Edit > Find and Replace..." Ctrl+F
 
1

123Jim

Jonathan N. Little said:
Hmmm, when did they remove it? "Edit > Find and Replace..." Ctrl+F


Kompozer does: find and replace in multiple files in a click? I don't think
so.
??
 
D

Dave

123Jim said:
ah .. the trouble is my hosting is free from my ISP (UK Tiscali, Talk talk)
and does not provide any server side stuff.


Every pure static html site I develop these days is actually written in
PHP, sometimes entirely PHP, sometimes a mix of HTML and PHP.

I use a client side copy of PHP.EXE to build my static HTML files and
upload these to the server. With a batch file you can literally set it
up so that a single double-click of the .BAT will rebuild the entire
site and upload it. You could even use MAKE to just rebuild and upload
the changed files.

Having the site in PHP means you can implement your nav menu or any
other content that appears repeatedly throughout the site as a call to a
PHP function. In fact, decoupling the structure of the site's source
from the structure of the resultant HTML is rather like the difference
between programming in the old non-structured BASIC versus something
like C++; I would never go back to the former now. Plus, it's a great
way to learn PHP - you have a nice big rich PHP sandpit to play in and
no need to worry about security because it only runs locally on your PC.
 
1

123Jim

Dave said:
Every pure static html site I develop these days is actually written in
PHP, sometimes entirely PHP, sometimes a mix of HTML and PHP.

I use a client side copy of PHP.EXE to build my static HTML files and
upload these to the server. With a batch file you can literally set it up
so that a single double-click of the .BAT will rebuild the entire site and
upload it. You could even use MAKE to just rebuild and upload the changed
files.

Having the site in PHP means you can implement your nav menu or any other
content that appears repeatedly throughout the site as a call to a PHP
function. In fact, decoupling the structure of the site's source from the
structure of the resultant HTML is rather like the difference between
programming in the old non-structured BASIC versus something like C++; I
would never go back to the former now. Plus, it's a great way to learn
PHP - you have a nice big rich PHP sandpit to play in and no need to worry
about security because it only runs locally on your PC.

I am under the impression that PHP is "Server-side HTML embedded scripting
language"
How can you be sure your visitors will have a local version of PHP.exe ?
 
D

Dave

123Jim said:
I am under the impression that PHP is "Server-side HTML embedded scripting
language"
How can you be sure your visitors will have a local version of PHP.exe ?

It's not for your visitors; it's being used client-side only by the
developer. The visitors only see the static html.
 
1

123Jim

Dave said:
It's not for your visitors; it's being used client-side only by the
developer. The visitors only see the static html.

Ah, interesting thanks.

The question occurs to me ... What is an example of a NON-static web
page/site? Youtube?
 
D

Dave

123Jim said:
Ah, interesting thanks.

The question occurs to me ... What is an example of a NON-static web
page/site? Youtube?

Well yes, but that's a rather complex site and I wouldn't want to imply
a relationship between complexity and staticness.

A pure static html site can only employ HTML, CSS and JavaScript.

If the site uses server-side scripting (like PHP) or other server-side
features like SSI then you'd class that as non-static because the server
needs to generate the page each time a request is made for it rather
than just serving up an existing static HTML file. For example, if you
needed something like a database lookup then you'd need to use
server-side technology.
 
J

Jonathan N. Little

I am under the impression that PHP is "Server-side HTML embedded scripting
language"
How can you be sure your visitors will have a local version of PHP.exe ?

IOW he is using PHP on his machine as a preprocessor.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top