HTML Title Menu question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Juggler
    New Member
    • Oct 2006
    • 6

    HTML Title Menu question

    I have a HTML question. I am not satified with the title/menu of one of the websites I have made,
    http://www.geocities.c om/floridaeveryone forgot

    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.
  • drhowarddrfine
    Recognized Expert Expert
    • Sep 2006
    • 7434

    #2
    No. Title is not a global element.

    Comment

    • Juggler
      New Member
      • Oct 2006
      • 6

      #3
      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.

      Comment

      • drhowarddrfine
        Recognized Expert Expert
        • Sep 2006
        • 7434

        #4
        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?

        Comment

        • darkdirk1
          New Member
          • Oct 2006
          • 50

          #5
          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.....Ba sically 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?

          Comment

          • Juggler
            New Member
            • Oct 2006
            • 6

            #6
            Originally posted by darkdirk1
            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.....Ba sically 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?

            Comment

            • darkdirk1
              New Member
              • Oct 2006
              • 50

              #7
              This is the gist of it:
              Code:
              <?php
              // lets's define some variables
              
              $title='This page is pretty musical!';
              
              $content='There are unsmiling faces and bright plastic chains, and a wheel in perpetual motion.';
              
              $author='The Alan Parsons Project.';
              // now let's replace variable values in the document
              ?>
              <html>
              
              <head>
              
              <title><?php echo $title?></title>
              
              <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
              
              </head>
              
              <body>
              
              <div>
              
              <p><?php echo $content?></p>
              
              <p>The author of this song is: <?php echo $author?></p>
              
              </div>
              </body>
              </html>
              Okay a really powerful ability in PHP (not mentioned here) is the word
              Code:
              include
              With it you can just pop code willy-nilly where and when you need it.

              I copied that code from this tutorial:
              Founded in 1997, DEVShed is the perfect place for web developers to learn, share their work, and build upon the ideas of others.


              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.

              :>

              Comment

              • cassbiz
                New Member
                • Oct 2006
                • 202

                #8
                You can also use shtml if you do not want to use php. PHP is by far going to be the easiest.

                Code:
                <!--#include virtual="header.inc"-->

                Comment

                Working...