Menu and design elements on every page

  • Thread starter Steven LaPha Jr.
  • Start date
S

Steven LaPha Jr.

I was wondering if there was an easy way to seperate out the menu and some
design elements (logos in CSS boxes) and the like so they can be used on
every page. Instead of writing the code on every single page.

What I was thinking is along the way of including/importing. Like include a
simple HTML file with each page, that way I just have to update 1 page to
update all the menus and anything else that remains consistant on each page.

I know it's possible and have seen the code for it, but now here's the
question, how well does it work with MOST browsers (talking IE, Netscape,
Opera). Also since it would hold critical parts of the webpage it would have
to load fast as well.

Not looking for any PHP, CGI, ASP or whatever, just asking if the simple
solution works, or if there is something else equal to it. I just have a
basic hosting so nothing fancy.

Just wondeirng how everyone else does it.

Thanks
 
S

Spartanicus

Steven LaPha Jr. said:
I was wondering if there was an easy way to seperate out the menu and some
design elements (logos in CSS boxes) and the like so they can be used on
every page. Instead of writing the code on every single page.

Server side is the only proper way to do this.
 
B

brucie

in post: <
Be careful with that FAQ... with blanket statements like "JavaScript was
another suggested option, but JavaScript is unavailable on about 15% of
browsers and, like SSI, inserts computation time into every page-fetch" it
is seriously misleading.

apart from the 15% which is debatable the quote is correct. if you think
it should be changed then change it.
 
D

Dennis M. Marks

Steven said:
I was wondering if there was an easy way to seperate out the menu and some
design elements (logos in CSS boxes) and the like so they can be used on
every page. Instead of writing the code on every single page.

What I was thinking is along the way of including/importing. Like include a
simple HTML file with each page, that way I just have to update 1 page to
update all the menus and anything else that remains consistant on each page.

I know it's possible and have seen the code for it, but now here's the
question, how well does it work with MOST browsers (talking IE, Netscape,
Opera). Also since it would hold critical parts of the webpage it would have
to load fast as well.

Not looking for any PHP, CGI, ASP or whatever, just asking if the simple
solution works, or if there is something else equal to it. I just have a
basic hosting so nothing fancy.

Just wondeirng how everyone else does it.

Thanks
You can see a javascript method at my site. Since I don't have any
server side options available without extra cost this is the method I
chose.

There is a common menu that is always visible on the home page and can
be made to appear or disappear on other pages. The heading is unique on
the home page and is dynamically generated on other pages using the
page title.
 
R

Ramen Junkie

Steven LaPha Jr. said:
I was wondering if there was an easy way to seperate out the menu and some
design elements (logos in CSS boxes) and the like so they can be used on
every page. Instead of writing the code on every single page.

What I was thinking is along the way of including/importing. Like include a
simple HTML file with each page, that way I just have to update 1 page to
update all the menus and anything else that remains consistant on each page.

I know it's possible and have seen the code for it, but now here's the
question, how well does it work with MOST browsers (talking IE, Netscape,
Opera). Also since it would hold critical parts of the webpage it would have
to load fast as well.

Not looking for any PHP, CGI, ASP or whatever, just asking if the simple
solution works, or if there is something else equal to it. I just have a
basic hosting so nothing fancy.

Just wondeirng how everyone else does it.


Well here's a slightly different possible solution that could work depending
on how much the logos and menu need to be updated. You could always just
create a blank "template" file and edit that as needed. My page (when it's
online) has an upper logo and a menu on one side and only the content in the
center changes. I've got a template file on my computer that has the logo
and menu but nothing in the content area. When I need to update I just copy
the template file, rename the copy, then fill in the content. This way I
don't have to code the menu and title every time. Not to mention it means
the code for all the pages is extremely consistent. Since most of the
content is text articles it also means I can type them up in Word or
something where I have a spell checker, then paste the text into to the
template then quickly paste in line breaks where necessary.

That solution may have nothing to do with what you're trying to do though I
suppose.
 
M

Mitja

Steven LaPha Jr. said:
I was wondering if there was an easy way to seperate out the menu and some
design elements (logos in CSS boxes) and the like so they can be used on
every page. Instead of writing the code on every single page.

What I was thinking is along the way of including/importing.
.......

I've skimmed through other's answers; I think most options have already been
mentioned. If you don't change the content of your pages all that often,
there's another possibility. Write a short program (or make use of a
commercial one) that can process HTML-like files with include directives and
then put its output online. It's very much like server-side scripting, but
if you don't have the possibility of the latter, that's another way to go.
 

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

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top