By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,946 Members | 741 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,946 IT Pros & Developers. It's quick & easy.

HTML Title Menu question

P: 6
I have a HTML question. I am not satified with the title/menu of one of the websites I have made,
http://www.geocities.com/floridaeveryoneforgot

I want to change it, but to change the title and menu to what I want it to look like on every single page would require going through each of the 80 something pages of the website and changing it. Is there a way, without using frames, to save this part of the code to a different html file, and then embed it into each one of the pages. That way I can just change the seperate file when I want to update something without having to edit every single page when I make a change.

I know this is possible with frames, but I am really not a big fan of them. I like each page to load individually.

Thank you.
Oct 27 '06 #1
Share this Question
Share on Google+
7 Replies


drhowarddrfine
Expert 5K+
P: 7,435
No. Title is not a global element.
Oct 27 '06 #2

P: 6
I worded that wrong. Not the actual title title, like what goes into <title>, but rather the image that I use as the name of the website on the top of the page.
Oct 27 '06 #3

drhowarddrfine
Expert 5K+
P: 7,435
If you mean the header image "Florida..." then just replace the image with the one you want but keep the same name. I'm heading out the door so can't comment on the rest yet. Is that what you want to do?
Oct 27 '06 #4

P: 50
I also don't understand exactly what you are asking.
Sounds kinda like what the last guy suggested.....
I just wanted to slip in a quick editorial about seperating layers.
Any site over 10 pages should have some type of template driven logic system driving it and use stylesheets for this exact reason.
If you are all ready buried in a mountain of repetitious code, either you just gotta live with it or make the nessecary changes for future updates.
I really doubt frames has anything to do w/ your desired solution.

You may be like, okay what the heck is a template driven logic system!?!?
That may in fact be your question.....Basically requires learning a little bit of PHP or Vbscript.
A simple example is the header information.
Typically the header details are the same in every single page.
Why not take that text and load it into a php variable???
Then at the top of every page simply use, echo $header

This way you can change one header page and it will flow to all pages which use that command.
Often php developers put all their content in these files called .tpl files....
Then the actual page the user visits uses logic to decide what content it should display and echoes out the appropriate tpl file.
It's not complicated.

does that hit upon the question?
Oct 27 '06 #5

P: 6
I also don't understand exactly what you are asking.
Sounds kinda like what the last guy suggested.....
I just wanted to slip in a quick editorial about seperating layers.
Any site over 10 pages should have some type of template driven logic system driving it and use stylesheets for this exact reason.
If you are all ready buried in a mountain of repetitious code, either you just gotta live with it or make the nessecary changes for future updates.
I really doubt frames has anything to do w/ your desired solution.

You may be like, okay what the heck is a template driven logic system!?!?
That may in fact be your question.....Basically requires learning a little bit of PHP or Vbscript.
A simple example is the header information.
Typically the header details are the same in every single page.
Why not take that text and load it into a php variable???
Then at the top of every page simply use, echo $header

This way you can change one header page and it will flow to all pages which use that command.
Often php developers put all their content in these files called .tpl files....
Then the actual page the user visits uses logic to decide what content it should display and echoes out the appropriate tpl file.
It's not complicated.

does that hit upon the question?
Yes it does. I am talking about the Florida image as well as the links below it (home, civilization, etc). I'm not too familiar at all with the process you discussed. Do you know of any websites out there that provide online tutorials on how do do this?
Oct 27 '06 #6

P: 50
This is the gist of it:
Expand|Select|Wrap|Line Numbers
  1. <?php
  2. // lets's define some variables
  3.  
  4. $title='This page is pretty musical!';
  5.  
  6. $content='There are unsmiling faces and bright plastic chains, and a wheel in perpetual motion.';
  7.  
  8. $author='The Alan Parsons Project.';
  9. // now let's replace variable values in the document
  10. ?>
  11. <html>
  12.  
  13. <head>
  14.  
  15. <title><?php echo $title?></title>
  16.  
  17. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  18.  
  19. </head>
  20.  
  21. <body>
  22.  
  23. <div>
  24.  
  25. <p><?php echo $content?></p>
  26.  
  27. <p>The author of this song is: <?php echo $author?></p>
  28.  
  29. </div>
  30. </body>
  31. </html>
Okay a really powerful ability in PHP (not mentioned here) is the word
Expand|Select|Wrap|Line Numbers
  1. include
With it you can just pop code willy-nilly where and when you need it.

I copied that code from this tutorial:
http://www.devshed.com/c/a/PHP/Build...th-PHP-Part-I/

They get a little fancy with this one.
Some other considerations if youve never used php are,
the file must have a php extension.
You must be running php (its standard on Apache/nix and can be run on Win32 easily).

There are tricks to make working w/ strings easier.
I vote it's about time you learned a scripting language anyway.

:>
Oct 28 '06 #7

cassbiz
100+
P: 202
You can also use shtml if you do not want to use php. PHP is by far going to be the easiest.

Expand|Select|Wrap|Line Numbers
  1. <!--#include virtual="header.inc"--> 
Nov 3 '06 #8

Post your reply

Sign in to post your reply or Sign up for a free account.